Fixing javascript tests