npx ember-qunit-5-codemod setup-qunit-dom path/of/files/ or/some**/*glob.js
# or
yarn global add ember-qunit-5-codemod
ember-qunit-5-codemod setup-qunit-dom path/of/files/ or/some**/*glob.js
node ./bin/cli.js setup-qunit-dom path/of/files/ or/some**/*glob.js
Input (basic.input.js):
import Application from 'insights-hub-web-fe/app';
import config from 'insights-hub-web-fe/config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
setApplication(Application.create(config.APP));
start();
Output (basic.output.js):
import * as QUnit from 'qunit';
import { setup } from 'qunit-dom';
import Application from 'insights-hub-web-fe/app';
import config from 'insights-hub-web-fe/config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
setup(QUnit.assert);
setApplication(Application.create(config.APP));
start();
Input (test-default-import-specifier.input.js):
import QUnit from 'qunit';
import { setup } from 'qunit-dom';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
setup(QUnit.assert);
setApplication(Application.create(config.APP));
start();
Output (test-default-import-specifier.output.js):
import QUnit from 'qunit';
import { setup } from 'qunit-dom';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
setup(QUnit.assert);
setApplication(Application.create(config.APP));
start();