3 const assert = require( "node:assert/strict" );
5 // Ensure the jQuery property on global/window/module.exports/etc. was not
6 // created in a CommonJS environment.
7 // `global` is always checked in addition to passed parameters.
8 const ensureGlobalNotCreated = ( ...args ) => {
9 [ ...args, global ].forEach( function( object ) {
10 assert.strictEqual( object.jQuery, undefined,
11 "A jQuery global was created in a CommonJS environment." );
15 module.exports = { ensureGlobalNotCreated };