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

a skip before test fails when this.subject() is called in beforeEach #269

Closed
amiel opened this issue Apr 14, 2017 · 4 comments
Closed

a skip before test fails when this.subject() is called in beforeEach #269

amiel opened this issue Apr 14, 2017 · 4 comments

Comments

@amiel
Copy link

amiel commented Apr 14, 2017

I have a reproduction example at amiel/qunit-skip-example (this test shows the specific case).

I'm happy to look in to this further, but wanted to start by reporting the issue.

Does anyone know off-hand what the issue is?

Use Case

We frequently use this.subject() in beforeEach to set attributes on the subject that all tests share.

Normally this hasn't caused any issues, even when using skip, but we ran in to an exception when skip happened to be the first test.

Details

The first exception is:

beforeEach failed on it exists: undefined is not an object (evaluating 'module.setContext')

Which happens in qunit-module.js (in beforeEach). This is why I reported the bug here, but I'm not sure if it could be a symptom of an issue with qunit.

@rwjblue
Copy link
Member

rwjblue commented Apr 14, 2017

This sounds suspicious similar to #268 (comment) which was fixed upstream in qunitjs/qunit#1156...

@amiel
Copy link
Author

amiel commented Apr 17, 2017

@rwjblue wow, incredible timing. I can test my example project with an updated qunit once there's a release.

Should we leave this issue open until ember-cli-qunit can update its dependency on qunit to include the fix?

@trentmwillis
Copy link
Member

A fresh npm install should resolve this as qunitjs@2.3.2 is now released. Please reopen if it persists.

@amiel
Copy link
Author

amiel commented Apr 19, 2017

@trentmwillis, @rwjblue: example tests pass with qunit@2.3.2. Thank you very much 🍻

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

3 participants