mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
16 lines
480 B
JavaScript
16 lines
480 B
JavaScript
|
"use strict";
|
||
|
|
||
|
const assert = require( "node:assert" );
|
||
|
|
||
|
const { ensureGlobalNotCreated } = require( "./lib/ensure_global_not_created.cjs" );
|
||
|
const { getJQueryModuleSpecifier } = require( "./lib/jquery-module-specifier.cjs" );
|
||
|
|
||
|
const jQueryModuleSpecifier = getJQueryModuleSpecifier();
|
||
|
const jQueryFactory = require( jQueryModuleSpecifier );
|
||
|
|
||
|
assert.throws( () => {
|
||
|
jQueryFactory( {} );
|
||
|
}, /jQuery requires a window with a document/ );
|
||
|
|
||
|
ensureGlobalNotCreated( module.exports );
|