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

Doc: Suggest beforeEach for all tests with QUnit global hooks? #560

Open
nruth opened this issue Feb 15, 2024 · 1 comment
Open

Doc: Suggest beforeEach for all tests with QUnit global hooks? #560

nruth opened this issue Feb 15, 2024 · 1 comment

Comments

@nruth
Copy link

nruth commented Feb 15, 2024

It might be worth documenting this as a way of installing in an ember-cli app's test-helper.js
Excessive perhaps, but does the localStorage gets reset if you forget to add this to each test file?

setupWindowMock(QUnit.hooks)

These were added in QUnit 2.18, so relatively recent.

https://api.qunitjs.com/QUnit/hooks/
https://github.com/qunitjs/qunit/releases/tag/2.18.0

@nruth nruth changed the title QUnit global beforeEach Doc: Suggest beforeEach for all tests with QUnit global hooks? Feb 15, 2024
@simonihmig
Copy link
Owner

Yeah, makes sense. @nruth would you be up for a PR? 😀

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