@@ -30,47 +30,35 @@ describe('BuildBrowserFeatures', () => {
3030 '.browserslistrc' : 'IE 9-11' ,
3131 } ) ;
3232
33- const buildBrowserFeatures = new BuildBrowserFeatures (
34- workspaceRootSysPath ,
35- ScriptTarget . ES2015 ,
36- ) ;
37- expect ( buildBrowserFeatures . isDifferentialLoadingNeeded ( ) ) . toBe ( true ) ;
33+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
34+ expect ( buildBrowserFeatures . isDifferentialLoadingNeeded ( ScriptTarget . ES2015 ) ) . toBe ( true ) ;
3835 } ) ;
3936
4037 it ( 'should be false for Chrome and ES2015' , ( ) => {
4138 host . writeMultipleFiles ( {
4239 '.browserslistrc' : 'last 1 chrome version' ,
4340 } ) ;
4441
45- const buildBrowserFeatures = new BuildBrowserFeatures (
46- workspaceRootSysPath ,
47- ScriptTarget . ES2015 ,
48- ) ;
49- expect ( buildBrowserFeatures . isDifferentialLoadingNeeded ( ) ) . toBe ( false ) ;
42+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
43+ expect ( buildBrowserFeatures . isDifferentialLoadingNeeded ( ScriptTarget . ES2015 ) ) . toBe ( false ) ;
5044 } ) ;
5145
5246 it ( 'detects no need for differential loading for target is ES5' , ( ) => {
5347 host . writeMultipleFiles ( {
5448 '.browserslistrc' : 'last 1 chrome version' ,
5549 } ) ;
5650
57- const buildBrowserFeatures = new BuildBrowserFeatures (
58- workspaceRootSysPath ,
59- ScriptTarget . ES5 ,
60- ) ;
61- expect ( buildBrowserFeatures . isDifferentialLoadingNeeded ( ) ) . toBe ( false ) ;
51+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
52+ expect ( buildBrowserFeatures . isDifferentialLoadingNeeded ( ScriptTarget . ES5 ) ) . toBe ( false ) ;
6253 } ) ;
6354
6455 it ( 'should be false for Safari 10.1 when target is ES2015' , ( ) => {
6556 host . writeMultipleFiles ( {
6657 '.browserslistrc' : 'Safari 10.1' ,
6758 } ) ;
6859
69- const buildBrowserFeatures = new BuildBrowserFeatures (
70- workspaceRootSysPath ,
71- ScriptTarget . ES2015 ,
72- ) ;
73- expect ( buildBrowserFeatures . isDifferentialLoadingNeeded ( ) ) . toBe ( false ) ;
60+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
61+ expect ( buildBrowserFeatures . isDifferentialLoadingNeeded ( ScriptTarget . ES2015 ) ) . toBe ( false ) ;
7462 } ) ;
7563 } ) ;
7664
@@ -80,10 +68,7 @@ describe('BuildBrowserFeatures', () => {
8068 '.browserslistrc' : 'Safari 10.1' ,
8169 } ) ;
8270
83- const buildBrowserFeatures = new BuildBrowserFeatures (
84- workspaceRootSysPath ,
85- ScriptTarget . ES2015 ,
86- ) ;
71+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
8772 expect ( buildBrowserFeatures . isFeatureSupported ( 'es6-module' ) ) . toBe ( true ) ;
8873 } ) ;
8974
@@ -92,10 +77,7 @@ describe('BuildBrowserFeatures', () => {
9277 '.browserslistrc' : 'IE 9' ,
9378 } ) ;
9479
95- const buildBrowserFeatures = new BuildBrowserFeatures (
96- workspaceRootSysPath ,
97- ScriptTarget . ES2015 ,
98- ) ;
80+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
9981 expect ( buildBrowserFeatures . isFeatureSupported ( 'es6-module' ) ) . toBe ( false ) ;
10082 } ) ;
10183
@@ -104,10 +86,7 @@ describe('BuildBrowserFeatures', () => {
10486 '.browserslistrc' : 'last 1 chrome version' ,
10587 } ) ;
10688
107- const buildBrowserFeatures = new BuildBrowserFeatures (
108- workspaceRootSysPath ,
109- ScriptTarget . ES2015 ,
110- ) ;
89+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
11190 expect ( buildBrowserFeatures . isFeatureSupported ( 'es6-module' ) ) . toBe ( true ) ;
11291 } ) ;
11392
@@ -116,10 +95,7 @@ describe('BuildBrowserFeatures', () => {
11695 '.browserslistrc' : 'Edge 18' ,
11796 } ) ;
11897
119- const buildBrowserFeatures = new BuildBrowserFeatures (
120- workspaceRootSysPath ,
121- ScriptTarget . ES2015 ,
122- ) ;
98+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
12399 expect ( buildBrowserFeatures . isFeatureSupported ( 'es6-module' ) ) . toBe ( true ) ;
124100 } ) ;
125101 } ) ;
0 commit comments