added tests for js