Javascript test code