1 import assert from "node:assert/strict";
2 import { JSDOM } from "jsdom";
4 const { window } = new JSDOM( "" );
6 const { jQueryFactory: factoryImported } = await import( process.argv[ 2 ] );
7 const { jQueryFactory: factoryRequired } = await import( "../lib/jquery-require-factory.cjs" );
9 assert( factoryImported === factoryRequired,
10 "More than one copy of jQueryFactory exists" );
12 assert( !( "expando" in factoryImported ),
13 "jQuery.expando should not be attached to the factory" );
15 const $ = factoryImported( window );
17 assert( /^jQuery/.test( $.expando ), "jQuery.expando should be detected" );