-
Notifications
You must be signed in to change notification settings - Fork 783
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
Report affected modules for "hook called from wrong module" warning #1647
Comments
@chriskrycho Sounds good to me. Thanks! |
PR inbound later today or tomorrow! |
Add the names of the relevant modules so the message is more actionable for users who encounter it. Fixes qunitjs#1647
@chriskrycho Great. Meanwhile, if I may ask, did you welcome this warning while writing a new test, or did it find you as a surprise after upgrading QUnit? This is a brand new warning we added, so we're certainly open to feedback or use cases you may have, which could influence how we proceed with this in QUnit 3. |
I noticed it in a large app (LinkedIn) when working on other tests. I think the warning is good; the only issue was this one. As you can imagine, when you have tens of thousands of tests, tracing back to individual modules is tricky without more info! |
Add the names of the relevant modules so the message is more actionable for users who encounter it. Fixes #1647.
Currently, QUnit reports that a hook is called from the wrong module, but doesn't say which modules are affected:
qunit/src/module.js
Lines 114 to 118 in e457e29
—even though the information is attached to the module:
qunit/src/module.js
Line 28 in e457e29
This makes it quite difficult to figure out where the issue actually comes from. I'm happy to open a PR for this!
The text was updated successfully, but these errors were encountered: