added tests for js client