Javascript test cases