Migrate tests to test.js