Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit 6168620

Browse files
committed
test(@angular-devkit/build-optimizer): test enums don't lose export token
1 parent 8338150 commit 6168620

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ import { getWrapEnumsTransformer, testWrapEnums } from './wrap-enums';
1313
const transform = (content: string) => transformJavascript(
1414
{ content, getTransforms: [getWrapEnumsTransformer] }).content;
1515

16-
describe('prefix-classes', () => {
16+
describe('wrap-enums', () => {
1717
it('wraps ts 2.2 enums in IIFE', () => {
1818
const input = stripIndent`
19-
var ChangeDetectionStrategy = {};
19+
export var ChangeDetectionStrategy = {};
2020
ChangeDetectionStrategy.OnPush = 0;
2121
ChangeDetectionStrategy.Default = 1;
2222
ChangeDetectionStrategy[ChangeDetectionStrategy.OnPush] = "OnPush";
2323
ChangeDetectionStrategy[ChangeDetectionStrategy.Default] = "Default";
2424
`;
2525
const output = stripIndent`
26-
var ChangeDetectionStrategy = /*@__PURE__*/ (function () {
26+
export var ChangeDetectionStrategy = /*@__PURE__*/ (function () {
2727
var ChangeDetectionStrategy = {};
2828
ChangeDetectionStrategy.OnPush = 0;
2929
ChangeDetectionStrategy.Default = 1;
@@ -39,14 +39,14 @@ describe('prefix-classes', () => {
3939

4040
it('wraps ts 2.3 enums in IIFE', () => {
4141
const input = stripIndent`
42-
var ChangeDetectionStrategy;
42+
export var ChangeDetectionStrategy;
4343
(function (ChangeDetectionStrategy) {
4444
ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
4545
ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
4646
})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
4747
`;
4848
const output = stripIndent`
49-
var ChangeDetectionStrategy = /*@__PURE__*/ (function () {
49+
export var ChangeDetectionStrategy = /*@__PURE__*/ (function () {
5050
var ChangeDetectionStrategy = {};
5151
ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
5252
ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";

0 commit comments

Comments
 (0)