Opened 14 years ago
Closed 13 years ago
#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: | ||
Blocked by: | Blocking: |
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,
QUnit now has the noglobals check enabled by default.