mirror of
https://github.com/jquery/jquery.git
synced 2024-12-09 08:04:24 +00:00
23 lines
982 B
JavaScript
23 lines
982 B
JavaScript
|
import { $ } from "jquery";
|
||
|
import { $ as $slim } from "jquery/slim";
|
||
|
|
||
|
import { jQueryFactory } from "jquery/factory";
|
||
|
import { jQueryFactory as jQueryFactorySlim } from "jquery/factory-slim";
|
||
|
|
||
|
console.assert( /^jQuery/.test( $.expando ),
|
||
|
"jQuery.expando should be detected on full jQuery" );
|
||
|
console.assert( /^jQuery/.test( $slim.expando ),
|
||
|
"jQuery.expando should be detected on slim jQuery" );
|
||
|
|
||
|
console.assert( !( "expando" in jQueryFactory ),
|
||
|
"jQuery.expando should not be attached to the full factory" );
|
||
|
const $fromFactory = jQueryFactory( window );
|
||
|
console.assert( /^jQuery/.test( $fromFactory.expando ),
|
||
|
"jQuery.expando should be detected on full jQuery from factory" );
|
||
|
|
||
|
console.assert( !( "expando" in jQueryFactorySlim ),
|
||
|
"jQuery.expando should not be attached to the slim factory" );
|
||
|
const $fromFactorySlim = jQueryFactorySlim( window );
|
||
|
console.assert( /^jQuery/.test( $fromFactorySlim.expando ),
|
||
|
"jQuery.expando should be detected on slim jQuery from factory" );
|