@@ -448,28 +448,6 @@ describe('wrap enums and classes transformer', () => {
448448 } ) ;
449449
450450 describe ( 'wrap enums' , ( ) => {
451- it ( 'wraps ts 2.2 enums in IIFE' , ( ) => {
452- const input = tags . stripIndent `
453- export var ChangeDetectionStrategy = {};
454- ChangeDetectionStrategy.OnPush = 0;
455- ChangeDetectionStrategy.Default = 1;
456- ChangeDetectionStrategy[ChangeDetectionStrategy.OnPush] = "OnPush";
457- ChangeDetectionStrategy[ChangeDetectionStrategy.Default] = "Default";
458- ` ;
459- const output = tags . stripIndent `
460- export var ChangeDetectionStrategy = /*@__PURE__*/ (function () {
461- var ChangeDetectionStrategy = {};
462- ChangeDetectionStrategy.OnPush = 0;
463- ChangeDetectionStrategy.Default = 1;
464- ChangeDetectionStrategy[ChangeDetectionStrategy.OnPush] = "OnPush";
465- ChangeDetectionStrategy[ChangeDetectionStrategy.Default] = "Default";
466- return ChangeDetectionStrategy;
467- }());
468- ` ;
469-
470- expect ( tags . oneLine `${ transform ( input ) } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
471- } ) ;
472-
473451 it ( 'should not wrap enum like object literal declarations' , ( ) => {
474452 const input = tags . stripIndent `
475453 const RendererStyleFlags3 = {
@@ -486,63 +464,6 @@ describe('wrap enums and classes transformer', () => {
486464 expect ( tags . oneLine `${ transform ( input ) } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
487465 } ) ;
488466
489- it ( 'wraps ES2015 tsickle enums in IIFE' , ( ) => {
490- const input = tags . stripIndent `
491- const ChangeDetectionStrategy = {
492- OnPush: 0,
493- Default: 1,
494- };
495- export { ChangeDetectionStrategy };
496- ChangeDetectionStrategy[ChangeDetectionStrategy.OnPush] = 'OnPush';
497- ChangeDetectionStrategy[ChangeDetectionStrategy.Default] = 'Default';
498- ` ;
499-
500- const output = tags . stripIndent `
501- export const ChangeDetectionStrategy = /*@__PURE__*/ (function () {
502- var ChangeDetectionStrategy = { OnPush: 0, Default: 1, };
503-
504- ChangeDetectionStrategy[ChangeDetectionStrategy.OnPush] = 'OnPush';
505- ChangeDetectionStrategy[ChangeDetectionStrategy.Default] = 'Default';
506- return ChangeDetectionStrategy;
507- }());
508- ` ;
509-
510- expect ( tags . oneLine `${ transform ( input ) } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
511- } ) ;
512-
513- it ( 'wraps only ES2015 tsickle enums in IIFE' , ( ) => {
514- const input = tags . stripIndent `
515- const RendererStyleFlags3 = {
516- Important: 1,
517- DashCase: 2,
518- };
519- export { RendererStyleFlags3 };
520- RendererStyleFlags3[RendererStyleFlags3.Important] = 'Important';
521- RendererStyleFlags3[RendererStyleFlags3.DashCase] = 'DashCase';
522-
523- export const domRendererFactory3 = {
524- createRenderer: (hostElement, rendererType) => { return document; }
525- };
526-
527- export const unusedValueExportToPlacateAjd = 1;
528- ` ;
529- const output = tags . stripIndent `
530- export const RendererStyleFlags3 = /*@__PURE__*/ (function () {
531- var RendererStyleFlags3 = { Important: 1, DashCase: 2, };
532- RendererStyleFlags3[RendererStyleFlags3.Important] = 'Important';
533- RendererStyleFlags3[RendererStyleFlags3.DashCase] = 'DashCase';
534- return RendererStyleFlags3;
535- }());
536-
537- export const domRendererFactory3 = {
538- createRenderer: (hostElement, rendererType) => { return document; }
539- };
540-
541- export const unusedValueExportToPlacateAjd = 1;
542- ` ;
543-
544- expect ( tags . oneLine `${ transform ( input ) } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
545- } ) ;
546467
547468 it ( 'wraps ts >2.3 enums in IIFE' , ( ) => {
548469 const input = tags . stripIndent `
@@ -662,39 +583,6 @@ describe('wrap enums and classes transformer', () => {
662583 expect ( tags . oneLine `${ transform ( input ) } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
663584 } ) ;
664585
665- it ( 'wraps tsickle enums in IIFE' , ( ) => {
666- const input = tags . stripIndent `
667- /** @enum {number} */
668- var FormatWidth = {
669- Short: 0,
670- Medium: 1,
671- Long: 2,
672- Full: 3,
673- };
674- FormatWidth[FormatWidth.Short] = "Short";
675- FormatWidth[FormatWidth.Medium] = "Medium";
676- FormatWidth[FormatWidth.Long] = "Long";
677- FormatWidth[FormatWidth.Full] = "Full";
678- ` ;
679- const output = tags . stripIndent `
680- /** @enum {number} */ var FormatWidth = /*@__PURE__*/ (function () {
681- var FormatWidth = {
682- Short: 0,
683- Medium: 1,
684- Long: 2,
685- Full: 3,
686- };
687- FormatWidth[FormatWidth.Short] = "Short";
688- FormatWidth[FormatWidth.Medium] = "Medium";
689- FormatWidth[FormatWidth.Long] = "Long";
690- FormatWidth[FormatWidth.Full] = "Full";
691- return FormatWidth;
692- }());
693- ` ;
694-
695- expect ( tags . oneLine `${ transform ( input ) } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
696- } ) ;
697-
698586 it ( 'wraps enums with multi-line comments in IIFE' , ( ) => {
699587 const input = tags . stripIndent `
700588 /**
0 commit comments