Made RPS tests pass in JS