File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ import { module , test } from 'qunit' ;
2+ import { setupTest } from 'ember-qunit' ;
3+
4+ import { macroCondition , dependencySatisfies } from '@embroider/macros' ;
5+
6+ module ( 'Unit | inert' , function ( hooks ) {
7+ setupTest ( hooks ) ;
8+
9+ function hasPolyfill ( ) {
10+ let initializers = [ 'install-function-helper-manager' , 'usable-function-manager' ] ;
11+
12+ return Object . keys ( window . requirejs . entries ) . some ( e => initializers . some ( name => e . includes ( name ) ) )
13+ }
14+
15+ if ( macroCondition ( dependencySatisfies ( 'ember-source' , '4.5.0-alpha.3' ) ) ) {
16+
17+ test ( 'polyfill is inert' , function ( assert ) {
18+ assert . strictEqual ( hasPolyfill ( ) , false , 'no polyfill' ) ;
19+ } ) ;
20+
21+ } else {
22+
23+ test ( 'polyfill is present' , function ( assert ) {
24+ assert . strictEqual ( hasPolyfill ( ) , true , 'has polyfill' ) ;
25+ } ) ;
26+
27+ }
28+
29+ } ) ;
You can’t perform that action at this time.
0 commit comments