Permalink
Browse files

enable QUnit.config.noglobals in tests

  • Loading branch information...
1 parent b30e40e commit e2e1d65147d5007c0c6288591bc8ed145e1958fa @akre54 akre54 committed Nov 12, 2015
Showing with 8 additions and 1 deletion.
  1. +1 −0 karma.conf-sauce.js
  2. +1 −0 karma.conf.js
  3. +1 −1 test/index.html
  4. +3 −0 test/qunit-setup.js
  5. +2 −0 test/utility.js
View
@@ -64,6 +64,7 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
'test/vendor/qunit-extras.js',
+ 'test/qunit-setup.js',
'underscore.js',
'test/*.js'
],
View
@@ -15,6 +15,7 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
'test/vendor/qunit-extras.js',
+ 'test/qunit-setup.js',
'underscore.js',
'test/*.js'
],
View
@@ -11,7 +11,7 @@
<script src="vendor/qunit.js"></script>
<script src="vendor/qunit-extras.js"></script>
<script src="../underscore.js"></script>
-
+ <script src="qunit-setup.js"></script>
<script src="collections.js"></script>
<script src="arrays.js"></script>
<script src="functions.js"></script>
View
@@ -0,0 +1,3 @@
+(function() {
+ QUnit.config.noglobals = true;
+}());
View
@@ -21,6 +21,8 @@
if (typeof require != 'function') {
assert.equal(this._, void 0, 'global underscore is removed');
this._ = underscore;
+ } else if (typeof global !== 'undefined') {
+ delete global._;
}
});
}

0 comments on commit e2e1d65

Please sign in to comment.