Bug Tracker

Modify

Ticket #4976 (closed enhancement: invalid)

Opened 4 years ago

Last modified 4 years ago

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

comment:1 Changed 4 years ago by joern

  • Status changed from new to closed
  • Resolution set to invalid

QUnit now has the noglobals check enabled by default.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.