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

Fix modules with no callbacks #267

Merged
merged 1 commit into from
Apr 11, 2017
Merged

Conversation

trentmwillis
Copy link
Member

@trentmwillis trentmwillis commented Apr 11, 2017

Introduced a bug with #260.

This fixes it and adds a regression test.

@trentmwillis trentmwillis merged commit b51ff3a into emberjs:master Apr 11, 2017
@bendemboski
Copy link

bendemboski commented Apr 12, 2017

@trentmwillis @rwjblue I'm seeing a bizarre error that appears to be caused by #260. I run my whole suite, and a few modules towards the end of the suite fail because module is undefined in beforeEach. I put in some logging, and before is not being called for these module. I can see beforeEach() being called for each test (with module=undefined), and after being called, but `before is not getting called.

The tests that are failing are my route and service unit tests -- a couple of route tests pass, then the rest and all the service tests fail, then next is some non-ember-qunit modules that pass.

I'm trying to dig in more to zero in on the cause, but I'm kinda unfamiliar with this code. Any guidance or help would be much appreciated. If either of you have time, you can also hit me up on Ember Community Slack.

ember-cli@2.9.1
ember-cli-qunit@3.1.2
ember-qunit@2.1.2
qunitjs@2.3.1
me@super.duper.confused

@rwjblue
Copy link
Member

rwjblue commented Apr 12, 2017

I put in some logging, and before is not being called for these module.

@bendemboski - Definitely seems unexpected. Can you open up a new issue so we can have somewhere to work with you on tracking it down?

@trentmwillis - Is there anything special about the way before is called in QUnit? Any possible issues with multiple modules using the same name or something like that?

@trentmwillis
Copy link
Member Author

I don't think so. Basically, there is an internal module object that has an array of tests and sub-modules. Whenever a test is run, it checks with the module it is registered with to determine which hooks should fire.

A reproduction would be immensely helpful here as the QUnit hooks are pretty well tested.

@bendemboski
Copy link

#268 -- I'll work on getting more info and/or a repro that I can share.

@bendemboski
Copy link

Turns out this is a bug in QUnit triggered when the first or last test in a module is skipped. I opened a PR with a fix over there.

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

Successfully merging this pull request may close these issues.

None yet

3 participants