@@ -12,19 +12,11 @@ import { default as adjustTypeScriptEnums } from './adjust-typescript-enums';
1212// eslint-disable-next-line import/no-extraneous-dependencies
1313const prettier = require ( 'prettier' ) ;
1414
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 {
2416 const result = transform ( input , {
2517 configFile : false ,
2618 babelrc : false ,
27- plugins : [ [ adjustTypeScriptEnums , options ] ] ,
19+ plugins : [ [ adjustTypeScriptEnums ] ] ,
2820 } ) ;
2921 if ( ! result ) {
3022 fail ( 'Expected babel to return a transform result.' ) ;
@@ -211,7 +203,7 @@ describe('adjust-typescript-enums Babel plugin', () => {
211203 ` ) ;
212204 } ) ;
213205
214- it ( 'wraps TypeScript enums in loose mode ' , ( ) => {
206+ it ( 'wraps TypeScript enums' , ( ) => {
215207 testCase ( {
216208 input : `
217209 var ChangeDetectionStrategy;
@@ -228,23 +220,19 @@ describe('adjust-typescript-enums Babel plugin', () => {
228220 return ChangeDetectionStrategy;
229221 })();
230222 ` ,
231- options : { loose : true } ,
232223 } ) ;
233224 } ) ;
234225
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 : `
241229 var ChangeDetectionStrategy$1;
242230 (function (ChangeDetectionStrategy) {
243231 ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
244232 ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
245233 })(ChangeDetectionStrategy$1 || (ChangeDetectionStrategy$1 = {}));
246234 ` ,
247- expected : `
235+ expected : `
248236 var ChangeDetectionStrategy$1 = /*#__PURE__*/ (() => {
249237 (function (ChangeDetectionStrategy) {
250238 ChangeDetectionStrategy[(ChangeDetectionStrategy["OnPush"] = 0)] = "OnPush";
@@ -253,8 +241,6 @@ describe('adjust-typescript-enums Babel plugin', () => {
253241 return ChangeDetectionStrategy$1;
254242 })();
255243 ` ,
256- options : { loose : true } ,
257- } ) ;
258- } ,
259- ) ;
244+ } ) ;
245+ } ) ;
260246} ) ;
0 commit comments