aboutsummaryrefslogtreecommitdiffstats
path: root/test/node_smoke_tests/commonjs/regular/window_present_originally.cjs
blob: 644a15a77702c960634850de2101fa557dd2f8c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"use strict";

const { JSDOM } = require( "jsdom" );

const { ensureJQuery } = require( "../lib/ensure_jquery.cjs" );
const { ensureGlobalNotCreated } = require( "../lib/ensure_global_not_created.cjs" );
const { getJQueryModuleSpecifier } = require( "../lib/jquery-module-specifier.cjs" );

const jQueryModuleSpecifier = getJQueryModuleSpecifier();

const { window } = new JSDOM( "" );

// Set the window global.
globalThis.window = window;

const jQuery = require( jQueryModuleSpecifier );

ensureJQuery( jQuery );
ensureGlobalNotCreated( module.exports, window );