2015-04-26 17:33:05 +00:00
|
|
|
"use strict";
|
|
|
|
|
2015-06-01 21:25:38 +00:00
|
|
|
var assert = require( "assert" );
|
|
|
|
|
2015-04-26 17:33:05 +00:00
|
|
|
// 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 ) {
|
2015-06-01 21:25:38 +00:00
|
|
|
assert.strictEqual( object.jQuery, undefined,
|
|
|
|
"A jQuery global was created in a CommonJS environment." );
|
2015-04-26 17:33:05 +00:00
|
|
|
} );
|
|
|
|
};
|