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

Avoid Testem.hookIntoTestFramework unless QUnit or Mocha are defined. #531

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

rwjblue
Copy link
Collaborator

@rwjblue rwjblue commented Sep 16, 2020

Fixes #530

Comment on lines +256 to 258
if (typeof Testem !== 'undefined' && (typeof QUnit !== 'undefined' || typeof Mocha !== 'undefined')) {
Testem.hookIntoTestFramework();
}`,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think this is transitionary. Once I can roll out ember-qunit@5.0.0 more broadly, we can remove this completely (and release a breaking change release).

@rwjblue
Copy link
Collaborator Author

rwjblue commented Sep 16, 2020

I've confirmed (by locally editing node_modules/@embroider/core/src/app.js) that emberjs/ember-qunit#756 passes with these changes.

@ef4
Copy link
Contributor

ef4 commented Sep 16, 2020

Thanks.

If QUnit or Mocha is not defined at this point, where does the hookIntoTestFramework() thing happen instead?

@rwjblue
Copy link
Collaborator Author

rwjblue commented Sep 16, 2020

If QUnit or Mocha is not defined at this point, where does the hookIntoTestFramework() thing happen instead?

ember-qunit invokes it when it knows for sure that QUnit is defined (because it itself has imported it):

https://github.com/emberjs/ember-qunit/blob/32c4cee9dd266bf36f76274d33c713306feada61/addon-test-support/index.js#L8-L10

(Added in emberjs/ember-qunit@223e0cf)

@ef4 ef4 merged commit e6f2db8 into embroider-build:master Sep 16, 2020
@rwjblue rwjblue deleted the hook-into-test-framework branch September 16, 2020 20:23
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.

Avoiding Testem.hookIntoTestFramework() invocation with ember-qunit@5.0.0-beta.3+
2 participants