Ticket #4976 (closed enhancement: invalid)
qunit: allow enabling the noglobal option in code
| Reported by: | dwt | Owned by: | joern |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | qunit | Version: | |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Reason: so a testrunner can decide to always enable it without needing to manipulate the url.
For me it is important that the testsuite always has this option set, as I don't want to teach every developer on how to run the testsuite with ?noglobals appended each time.
Here's how I did this:
Index: htdocs/js/tests/testrunner.js =================================================================== --- htdocs/js/tests/testrunner.js (Revision 610) +++ htdocs/js/tests/testrunner.js (Revision 611) @@ -235,7 +235,12 @@
equiv: equiv, ok: ok, done: function(failures, total){},
- log: function(result, message){}
+ log: function(result, message){}, + noglobals: function(optionalShouldDisableGlobals) { + if (undefined !== optionalShouldDisableGlobals) + noglobals = optionalShouldDisableGlobals; + return noglobals; + }
}, legacy methods below isSet: isSet,
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

QUnit now has the noglobals check enabled by default.