@@ -30,47 +30,35 @@ describe('BuildBrowserFeatures', () => {
30
30
'.browserslistrc' : 'IE 9-11' ,
31
31
} ) ;
32
32
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 ) ;
38
35
} ) ;
39
36
40
37
it ( 'should be false for Chrome and ES2015' , ( ) => {
41
38
host . writeMultipleFiles ( {
42
39
'.browserslistrc' : 'last 1 chrome version' ,
43
40
} ) ;
44
41
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 ) ;
50
44
} ) ;
51
45
52
46
it ( 'detects no need for differential loading for target is ES5' , ( ) => {
53
47
host . writeMultipleFiles ( {
54
48
'.browserslistrc' : 'last 1 chrome version' ,
55
49
} ) ;
56
50
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 ) ;
62
53
} ) ;
63
54
64
55
it ( 'should be false for Safari 10.1 when target is ES2015' , ( ) => {
65
56
host . writeMultipleFiles ( {
66
57
'.browserslistrc' : 'Safari 10.1' ,
67
58
} ) ;
68
59
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 ) ;
74
62
} ) ;
75
63
} ) ;
76
64
@@ -80,10 +68,7 @@ describe('BuildBrowserFeatures', () => {
80
68
'.browserslistrc' : 'Safari 10.1' ,
81
69
} ) ;
82
70
83
- const buildBrowserFeatures = new BuildBrowserFeatures (
84
- workspaceRootSysPath ,
85
- ScriptTarget . ES2015 ,
86
- ) ;
71
+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
87
72
expect ( buildBrowserFeatures . isFeatureSupported ( 'es6-module' ) ) . toBe ( true ) ;
88
73
} ) ;
89
74
@@ -92,10 +77,7 @@ describe('BuildBrowserFeatures', () => {
92
77
'.browserslistrc' : 'IE 9' ,
93
78
} ) ;
94
79
95
- const buildBrowserFeatures = new BuildBrowserFeatures (
96
- workspaceRootSysPath ,
97
- ScriptTarget . ES2015 ,
98
- ) ;
80
+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
99
81
expect ( buildBrowserFeatures . isFeatureSupported ( 'es6-module' ) ) . toBe ( false ) ;
100
82
} ) ;
101
83
@@ -104,10 +86,7 @@ describe('BuildBrowserFeatures', () => {
104
86
'.browserslistrc' : 'last 1 chrome version' ,
105
87
} ) ;
106
88
107
- const buildBrowserFeatures = new BuildBrowserFeatures (
108
- workspaceRootSysPath ,
109
- ScriptTarget . ES2015 ,
110
- ) ;
89
+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
111
90
expect ( buildBrowserFeatures . isFeatureSupported ( 'es6-module' ) ) . toBe ( true ) ;
112
91
} ) ;
113
92
@@ -116,10 +95,7 @@ describe('BuildBrowserFeatures', () => {
116
95
'.browserslistrc' : 'Edge 18' ,
117
96
} ) ;
118
97
119
- const buildBrowserFeatures = new BuildBrowserFeatures (
120
- workspaceRootSysPath ,
121
- ScriptTarget . ES2015 ,
122
- ) ;
98
+ const buildBrowserFeatures = new BuildBrowserFeatures ( workspaceRootSysPath ) ;
123
99
expect ( buildBrowserFeatures . isFeatureSupported ( 'es6-module' ) ) . toBe ( true ) ;
124
100
} ) ;
125
101
} ) ;
0 commit comments