Build: Add `exports` to package.json, export slim & esm builds
[jquery.git] / test / node_smoke_tests / module / lib / ensure_global_not_created.js
blobd7648bd68627ffa5c9c757c5814b0170500f5ec8
1 import assert from "node:assert";
3 // Ensure the jQuery property on global/window/module "this"/etc. was not
4 // created in a CommonJS environment.
5 // `global` is always checked in addition to passed parameters.
6 export const ensureGlobalNotCreated = ( ...args ) => {
7         [ ...args, global ].forEach( function( object ) {
8                 assert.strictEqual( object.jQuery, undefined,
9                         "A jQuery global was created in a module environment." );
10         } );