js test cases passing