Migrating test builder to JS