ember-qunit-codemod
ember-qunit-codemod copied to clipboard
Nested module invocations shouldn't be rewritten
Input & Expected Output
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { withMoar } from 'foo-bar';
module('Acceptance | foo-bar', function () {
setupTest();
function tests() {
test('test one', function() {});
test('test two', function() {});
}
tests();
module('[moar enabled]', withMoar(tests)); // This should stay the same
});
Actual output:
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { withMoar } from 'foo-bar';
module('Acceptance | foo-bar', function () {
setupTest();
function tests() {
test('test one', function() {});
test('test two', function() {});
}
tests();
module(withMoar(tests), function() {}); // This didn't stay the same
});