Don't assign window.jQuery in jasmine-jquery.js helper

I wrap it in a function wrapper to ensure that the assignment
`var jQuery` doesn't end up assigning a window global.
This commit is contained in:
Nathan Sobo
2013-04-17 17:29:13 -06:00
committed by Corey Johnson & Kevin Sawicki
parent ba6d3a1124
commit b70ff1b164
2 changed files with 4 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ require 'window'
window.setUpEnvironment()
nakedLoad 'jasmine-jquery'
$ = require 'jquery'
$ = jQuery = require 'jquery'
_ = require 'underscore'
Keymap = require 'keymap'
Config = require 'config'

View File

@@ -1,4 +1,5 @@
jQuery = require('jquery');
(function(jQuery) {
jasmine.JQuery = function() {};
jasmine.JQuery.browserTagCaseIndependentHtml = function(html) {
@@ -174,4 +175,4 @@ beforeEach(function() {
afterEach(function() {
jasmine.JQuery.events.cleanUp();
});
})(require('jquery'));