ember-qunit-codemod icon indicating copy to clipboard operation
ember-qunit-codemod copied to clipboard

Nested module invocations shouldn't be rewritten

Open tmquinn opened this issue 6 years ago • 0 comments

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
});

tmquinn avatar Dec 20 '18 01:12 tmquinn