Skip to content

Nested module invocations shouldn't be rewritten #157

@tmquinn

Description

@tmquinn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions