mirror of
https://github.com/jquery/jquery.git
synced 2026-02-02 14:45:08 -05:00
Fixes gh-2133
Fixes gh-2501
Closes gh-2504
Refs gh-1950
Refs gh-1949
Refs gh-2397
Refs gh-1537
Refs gh-2504
Refs 842958e7ae
16 lines
494 B
JavaScript
16 lines
494 B
JavaScript
"use strict";
|
|
|
|
var assert = require( "assert" );
|
|
|
|
// Ensure the jQuery property on global/window/module.exports/etc. was not
|
|
// created in a CommonJS environment.
|
|
// `global` is always checked in addition to passed parameters.
|
|
module.exports = function ensureGlobalNotCreated() {
|
|
var args = [].slice.call( arguments ).concat( global );
|
|
|
|
args.forEach( function( object ) {
|
|
assert.strictEqual( object.jQuery, undefined,
|
|
"A jQuery global was created in a CommonJS environment." );
|
|
} );
|
|
};
|