@@ -100,6 +100,44 @@ describe('build-optimizer', () => {
100
100
expect ( boOutput . emitSkipped ) . toEqual ( false ) ;
101
101
} ) ;
102
102
103
+ it ( `doesn't add pure comments to tslib helpers` , ( ) => {
104
+ const input = tags . stripIndent `
105
+ class LanguageState {
106
+ }
107
+
108
+ LanguageState.ctorParameters = () => [
109
+ { type: TranslateService },
110
+ { type: undefined, decorators: [{ type: Inject, args: [LANGUAGE_CONFIG,] }] }
111
+ ];
112
+
113
+ __decorate([
114
+ Action(CheckLanguage),
115
+ __metadata("design:type", Function),
116
+ __metadata("design:paramtypes", [Object]),
117
+ __metadata("design:returntype", void 0)
118
+ ], LanguageState.prototype, "checkLanguage", null);
119
+ ` ;
120
+
121
+ const output = tags . oneLine `
122
+ let LanguageState = /*@__PURE__*/ (() => {
123
+ class LanguageState {
124
+ }
125
+
126
+ __decorate([
127
+ Action(CheckLanguage),
128
+ __metadata("design:type", Function),
129
+ __metadata("design:paramtypes", [Object]),
130
+ __metadata("design:returntype", void 0)
131
+ ], LanguageState.prototype, "checkLanguage", null);
132
+ return LanguageState;
133
+ })();
134
+ ` ;
135
+
136
+ const boOutput = buildOptimizer ( { content : input , isSideEffectFree : true } ) ;
137
+ expect ( tags . oneLine `${ boOutput . content } ` ) . toEqual ( output ) ;
138
+ expect ( boOutput . emitSkipped ) . toEqual ( false ) ;
139
+ } ) ;
140
+
103
141
it ( 'should not wrap classes which had all static properties dropped in IIFE' , ( ) => {
104
142
const classDeclaration = tags . oneLine `
105
143
import { Injectable } from '@angular/core';
0 commit comments