Skip to content

Commit 91313ae

Browse files
committed
Fix enum toString test not working
1 parent 7546753 commit 91313ae

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

test/unit/enum.spec.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,18 @@ describe("const enum", () => {
139139
});
140140
});
141141

142-
test("enum toString", () => {
143-
const code = `
142+
test("toString", () => {
143+
util.testFunction`
144144
enum TestEnum {
145145
A,
146146
B,
147147
C,
148148
}
149-
let test = TestEnum.A;
150-
return test.toString();`;
151-
expect(util.transpileAndExecute(code)).toBe(0);
149+
150+
function foo(value: TestEnum) {
151+
return value.toString();
152+
}
153+
154+
return foo(TestEnum.A);
155+
`.expectToMatchJsResult();
152156
});

0 commit comments

Comments
 (0)