Migrated tests to test.js