Fixed vector test in JavaScript