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

can't use Qunit's new before and after hooks #229

Closed
adhamhf opened this issue Jun 13, 2016 · 4 comments
Closed

can't use Qunit's new before and after hooks #229

adhamhf opened this issue Jun 13, 2016 · 4 comments

Comments

@adhamhf
Copy link

adhamhf commented Jun 13, 2016

Qunit 1.23.1 introduced before and after hooks that run before a module and after module. This supplement the beforeEach and afterEach that run before and after each test.

So far I have been unable to get the before hook to be invoked. I put a sample project at https://github.com/adhamhf/acceptance-qunit-before. The qunit-before-test.js acceptance test should log a message from before, but I never see that message.

Suggestions?

@fivetanley
Copy link
Member

What happens if you add

"qunit": "~1.32.1"

to your bower.json file?

@adhamhf
Copy link
Author

adhamhf commented Jun 13, 2016

Updated issue to reflect this is Qunit 1.23.1.

I added
"qunit": "~1.23.1"

and still don't get the before hook.... It could be something I've hosed...

I have no idea if this is related, but in dist I have a test-support.js and it has a queueHook function:

queueHook: function( hook, hookName ) {

In Qunit 1.23.1 this function also exists but it has a different signature:

queueHook: function( hook, hookName, hookOwner ) {

This is important for getting the before hook to work.

@trentmwillis
Copy link
Member

The before / after hooks weren't released until QUnit 2.0 (released today). So try that and hopefully you'll have better luck!

@adhamhf
Copy link
Author

adhamhf commented Jul 22, 2016

I'll close this and expect that ember-qunit will default to qunit 2 soon.

@adhamhf adhamhf closed this as completed Jul 22, 2016
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