Updated the js tests to use the new API