Convert tests to JavaScript