Fix JS unit tests