Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember Qunit should warn when forcing an integration test into a unit test. #185

Closed
matthewconstantine opened this issue Aug 26, 2015 · 1 comment

Comments

@matthewconstantine
Copy link

The readme explains that using needs will force a test into unit mode.

You do not require dependencies through needs:. Doing so will force the test into unit mode.

This is super hard to debug if you don't know about that behavior. Ember Qunit should throw an error or warn when it sees something like this:

moduleForComponent('x-foo', {
  integration: true,
  needs: ['component:x-bar']
});

The developer's intent is to use an integration test with integration: true. Without a warning the tests fail on this.set() or this.on(). And those failures are difficult to trace back to this behavior.

@rwjblue
Copy link
Member

rwjblue commented Aug 27, 2015

As demonstrated by http://rwjblue.jsbin.com/cukuku/edit?html,js,output, if you have integration: true and needs in the same module you do get an error:

cannot declare 'integration: true' and 'needs' in the same module

This error was implemented in emberjs/ember-test-helpers#78, and released in ember-qunit@0.4.10.

@rwjblue rwjblue closed this as completed Aug 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants