Codemod verified
Regularly tested and maintained by our engineers and codemod expert community.
Ember
migration
byCodemod
Ember/5/Convert Module For To Setup Test
Last update
Jul 24, 2024
This codemod transforms from the older moduleFor*
syntax of ember-qunit@2
to the newer setup*Test
syntax.
Before
import { moduleFor, test } from 'ember-qunit';moduleFor('service:flash', 'Unit | Service | Flash', {unit: true,});test('should allow messages to be queued', function (assert) {let subject = this.subject();});
After
import { setupTest } from 'ember-qunit';import { module, test } from 'qunit';module('Unit | Service | Flash', function (hooks) {setupTest(hooks);test('should allow messages to be queued', function (assert) {let subject = this.owner.lookup('service:flash');});});
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community