@@ -71,7 +71,7 @@ describe("get-babel-options", function () {
71
71
expect (
72
72
_addDecoratorPlugins ( [ ] , { } , { } , this . addon . parent , this . addon . project )
73
73
. length
74
- ) . to . equal ( 2 , "plugins added correctly" ) ;
74
+ ) . to . equal ( 4 , "plugins added correctly" ) ;
75
75
} ) ;
76
76
77
77
it ( "should include only fields if it detects decorators plugin" , function ( ) {
@@ -91,7 +91,7 @@ describe("get-babel-options", function () {
91
91
this . addon . parent ,
92
92
this . addon . project
93
93
) . length
94
- ) . to . equal ( 2 , "plugins were not added" ) ;
94
+ ) . to . equal ( 4 , "plugins were not added" ) ;
95
95
} ) ;
96
96
97
97
it ( "should include only decorators if it detects class fields plugin" , function ( ) {
@@ -123,7 +123,7 @@ describe("get-babel-options", function () {
123
123
this . addon . project
124
124
) ;
125
125
126
- expect ( strictPlugins [ 1 ] [ 1 ] . loose ) . to . equal (
126
+ expect ( strictPlugins [ strictPlugins . length - 1 ] [ 1 ] . loose ) . to . equal (
127
127
false ,
128
128
"loose is false if no option is provided"
129
129
) ;
@@ -136,7 +136,7 @@ describe("get-babel-options", function () {
136
136
this . addon . project
137
137
) ;
138
138
139
- expect ( loosePlugins [ 1 ] [ 1 ] . loose ) . to . equal (
139
+ expect ( loosePlugins [ loosePlugins . length - 1 ] [ 1 ] . loose ) . to . equal (
140
140
true ,
141
141
"loose setting added correctly"
142
142
) ;
@@ -157,7 +157,7 @@ describe("get-babel-options", function () {
157
157
"@babel/plugin-transform-typescript" ,
158
158
"typescript still first"
159
159
) ;
160
- expect ( plugins . length ) . to . equal ( 3 , "class fields and decorators added" ) ;
160
+ expect ( plugins . length ) . to . equal ( 5 , "class fields and decorators added" ) ;
161
161
} ) ;
162
162
163
163
it ( "should include class fields and decorators before typescript if not handling typescript" , function ( ) {
@@ -172,8 +172,8 @@ describe("get-babel-options", function () {
172
172
this . addon . project
173
173
) ;
174
174
175
- expect ( plugins . length ) . to . equal ( 3 , "class fields and decorators added" ) ;
176
- expect ( plugins [ 2 ] ) . to . equal (
175
+ expect ( plugins . length ) . to . equal ( 5 , "class fields and decorators added" ) ;
176
+ expect ( plugins [ 4 ] ) . to . equal (
177
177
"@babel/plugin-transform-typescript" ,
178
178
"typescript is now last"
179
179
) ;
0 commit comments