From 837100e35ee0d6a8377ba87dfc04e2a6d258b5da Mon Sep 17 00:00:00 2001 From: Jake Craige Date: Tue, 4 Nov 2014 08:55:07 -0600 Subject: [PATCH] always put proxyFixtures on the QUnit object --- lib/qunit.js | 3 +-- tests/unit/qunit-test.js | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/qunit.js b/lib/qunit.js index e0de312..7a3f0e2 100644 --- a/lib/qunit.js +++ b/lib/qunit.js @@ -75,8 +75,7 @@ var proxyFixtures = function proxyFixtures(name) { }); }; +QUnit.proxyFixtures = proxyFixtures; if(typeof module !== 'undefined' && typeof module.exports !== 'undefined') { module.exports = proxyFixtures; -} else { - QUnit.proxyFixtures = proxyFixtures; } diff --git a/tests/unit/qunit-test.js b/tests/unit/qunit-test.js index 486bc0d..f131005 100644 --- a/tests/unit/qunit-test.js +++ b/tests/unit/qunit-test.js @@ -1,12 +1,13 @@ +// Sinon must be required prior to resetGloals being called. This is because +// resetGlobals sets the `window` object and sinon will pick it up and think +// it's in the browser +var sinon = require('sinon'); + +resetGlobals(); var assert = require('assert'); -var sinon = require('sinon'); var proxyFixtures = require('../../lib/qunit'); describe('QUnit Injection', function() { - before(function() { - resetGlobals(); - }); - describe('calls QUnit lifecycle methods', function() { var spy; beforeEach(function() {