@@ -12,19 +12,11 @@ import { default as adjustTypeScriptEnums } from './adjust-typescript-enums';
12
12
// eslint-disable-next-line import/no-extraneous-dependencies
13
13
const prettier = require ( 'prettier' ) ;
14
14
15
- function testCase ( {
16
- input,
17
- expected,
18
- options,
19
- } : {
20
- input : string ;
21
- expected : string ;
22
- options ?: { loose ?: boolean } ;
23
- } ) : void {
15
+ function testCase ( { input, expected } : { input : string ; expected : string } ) : void {
24
16
const result = transform ( input , {
25
17
configFile : false ,
26
18
babelrc : false ,
27
- plugins : [ [ adjustTypeScriptEnums , options ] ] ,
19
+ plugins : [ [ adjustTypeScriptEnums ] ] ,
28
20
} ) ;
29
21
if ( ! result ) {
30
22
fail ( 'Expected babel to return a transform result.' ) ;
@@ -211,7 +203,7 @@ describe('adjust-typescript-enums Babel plugin', () => {
211
203
` ) ;
212
204
} ) ;
213
205
214
- it ( 'wraps TypeScript enums in loose mode ' , ( ) => {
206
+ it ( 'wraps TypeScript enums' , ( ) => {
215
207
testCase ( {
216
208
input : `
217
209
var ChangeDetectionStrategy;
@@ -228,23 +220,19 @@ describe('adjust-typescript-enums Babel plugin', () => {
228
220
return ChangeDetectionStrategy;
229
221
})();
230
222
` ,
231
- options : { loose : true } ,
232
223
} ) ;
233
224
} ) ;
234
225
235
- it (
236
- 'should not wrap TypeScript enums in loose mode if the declaration identifier has been ' +
237
- 'renamed to avoid collisions' ,
238
- ( ) => {
239
- testCase ( {
240
- input : `
226
+ it ( 'should not wrap TypeScript enums if the declaration identifier has been renamed to avoid collisions' , ( ) => {
227
+ testCase ( {
228
+ input : `
241
229
var ChangeDetectionStrategy$1;
242
230
(function (ChangeDetectionStrategy) {
243
231
ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
244
232
ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
245
233
})(ChangeDetectionStrategy$1 || (ChangeDetectionStrategy$1 = {}));
246
234
` ,
247
- expected : `
235
+ expected : `
248
236
var ChangeDetectionStrategy$1 = /*#__PURE__*/ (() => {
249
237
(function (ChangeDetectionStrategy) {
250
238
ChangeDetectionStrategy[(ChangeDetectionStrategy["OnPush"] = 0)] = "OnPush";
@@ -253,8 +241,6 @@ describe('adjust-typescript-enums Babel plugin', () => {
253
241
return ChangeDetectionStrategy$1;
254
242
})();
255
243
` ,
256
- options : { loose : true } ,
257
- } ) ;
258
- } ,
259
- ) ;
244
+ } ) ;
245
+ } ) ;
260
246
} ) ;
0 commit comments