1 import { $ as $imported } from "jquery";
2 import { $ as $slimImported } from "jquery/slim";
4 import { jQueryFactory as jQueryFactoryImported } from "jquery/factory";
5 import { jQueryFactory as jQueryFactorySlimImported } from "jquery/factory-slim";
10 jQueryFactoryRequired,
11 jQueryFactorySlimRequired
12 } from "./jquery-require.cjs";
14 console.assert( $required === $imported,
15 "Only one copy of full jQuery should exist" );
16 console.assert( /^jQuery/.test( $imported.expando ),
17 "jQuery.expando should be detected on full jQuery" );
19 console.assert( $slimRequired === $slimImported,
20 "Only one copy of slim jQuery should exist" );
21 console.assert( /^jQuery/.test( $slimImported.expando ),
22 "jQuery.expando should be detected on slim jQuery" );
24 console.assert( jQueryFactoryImported === jQueryFactoryRequired,
25 "Only one copy of full jQueryFactory should exist" );
26 console.assert( !( "expando" in jQueryFactoryImported ),
27 "jQuery.expando should not be attached to the full factory" );
28 const $fromFactory = jQueryFactoryImported( window );
29 console.assert( /^jQuery/.test( $fromFactory.expando ),
30 "jQuery.expando should be detected on full jQuery from factory" );
32 console.assert( jQueryFactorySlimImported === jQueryFactorySlimRequired,
33 "Only one copy of slim jQueryFactory should exist" );
34 console.assert( !( "expando" in jQueryFactorySlimImported ),
35 "jQuery.expando should not be attached to the slim factory" );
36 const $fromFactorySlim = jQueryFactorySlimImported( window );
37 console.assert( /^jQuery/.test( $fromFactorySlim.expando ),
38 "jQuery.expando should be detected on slim jQuery from factory" );