Fix JS tests & Travis

I'm surprised we made v2 without testing it on JS at all and with Travis broken the whole time. Better late than never!

Might want to put this commit into master as well. Though not as important if v2 is going in soon anyway.