Skip to content

isTesting from @embroider/macros returns false in tests if ember-classic-decorator is a devDependency  #99

@mrloop

Description

@mrloop

I've a minimal reproduction here https://github.com/mrloop/em-user-activity initially thought it was ember-user-activity causing the issue but it depends on ember-classic-decorator and the issue occurs with just ember-classic-decorator declared as a devDependency.

In the demonstration app the following test passes when ember-classic-decorator is not used.

import { module, test } from 'qunit';
import { setupTest } from 'my-data/tests/helpers';
import { isTesting } from '@embroider/macros';

module('Unit | Controller | isTesting', function (hooks) {
  setupTest(hooks);

  test('it exists', function (assert) {
    assert.true(isTesting(), 'isTesting should be true');
  });
});

When ember-classic-decorator is installed isTesting() returns false in the test.

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