mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
20 lines
547 B
JavaScript
20 lines
547 B
JavaScript
|
"use strict";
|
||
|
|
||
|
const { JSDOM } = require( "jsdom" );
|
||
|
|
||
|
const { ensureJQuery } = require( "./lib/ensure_jquery" );
|
||
|
const { ensureGlobalNotCreated } = require( "./lib/ensure_global_not_created" );
|
||
|
const { getJQueryModuleSpecifier } = require( "./lib/jquery-module-specifier" );
|
||
|
|
||
|
const jQueryModuleSpecifier = getJQueryModuleSpecifier();
|
||
|
|
||
|
const { window } = new JSDOM( "" );
|
||
|
|
||
|
// Set the window global.
|
||
|
global.window = window;
|
||
|
|
||
|
const jQuery = require( jQueryModuleSpecifier );
|
||
|
|
||
|
ensureJQuery( jQuery );
|
||
|
ensureGlobalNotCreated( module.exports, window );
|