mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
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:
committed by
Corey Johnson & Kevin Sawicki
parent
ba6d3a1124
commit
b70ff1b164
@@ -2,7 +2,7 @@ require 'window'
|
||||
window.setUpEnvironment()
|
||||
|
||||
nakedLoad 'jasmine-jquery'
|
||||
$ = require 'jquery'
|
||||
$ = jQuery = require 'jquery'
|
||||
_ = require 'underscore'
|
||||
Keymap = require 'keymap'
|
||||
Config = require 'config'
|
||||
|
||||
5
vendor/jasmine-jquery.js
vendored
5
vendor/jasmine-jquery.js
vendored
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user