Bug Tracker

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:


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 (1)

comment:1 Changed 13 years ago by joern

Resolution: invalid
Status: newclosed

QUnit now has the noglobals check enabled by default.

Note: See TracTickets for help on using tickets.