diff --git a/tests/format/misc/errors/typescript/enum/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/enum/__snapshots__/format.test.js.snap index e1d85e8e2..d1c03112b 100644 --- a/tests/format/misc/errors/typescript/enum/__snapshots__/format.test.js.snap +++ b/tests/format/misc/errors/typescript/enum/__snapshots__/format.test.js.snap @@ -12,7 +12,7 @@ Cause: Unexpected token (2:2)" exports[`snippet: #0 [babel-ts] format 2`] = ` "Unexpected token (2:3) 1 | enum Foo { -> 2 | [foo] = 1 +> 2 | ['foo'] = 1 | ^ 3 | } Cause: Unexpected token (2:2)" @@ -26,14 +26,6 @@ exports[`snippet: #0 [oxc-ts] format 1`] = ` 3 | }" `; -exports[`snippet: #0 [oxc-ts] format 2`] = ` -"Computed property names are not allowed in enums. (2:4) - 1 | enum Foo { -> 2 | [foo] = 1 - | ^^^ - 3 | }" -`; - exports[`snippet: #0 [typescript] format 1`] = ` "An enum member cannot have a numeric name. (2:3) 1 | enum Foo { @@ -46,8 +38,8 @@ Cause: An enum member cannot have a numeric name." exports[`snippet: #0 [typescript] format 2`] = ` "Computed property names are not allowed in enums. (2:3) 1 | enum Foo { -> 2 | [foo] = 1 - | ^^^^^ +> 2 | ['foo'] = 1 + | ^^^^^^^ 3 | } Cause: Computed property names are not allowed in enums." `; diff --git a/tests/format/misc/errors/typescript/enum/format.test.js b/tests/format/misc/errors/typescript/enum/format.test.js index 96b470445..5088bd10b 100644 --- a/tests/format/misc/errors/typescript/enum/format.test.js +++ b/tests/format/misc/errors/typescript/enum/format.test.js @@ -14,13 +14,10 @@ runFormatTest( ["typescript", "babel-ts", "oxc-ts"], ); -// `oxc-ts` not rejecting -// https://github.com/microsoft/TypeScript/issues/61834 -// https://github.com/microsoft/TypeScript/issues/42468 runFormatTest( { importMeta: import.meta, - snippets: ["[foo]"].map( + snippets: ["['foo']"].map( (key) => outdent` enum Foo { ${key} = 1 @@ -28,5 +25,12 @@ runFormatTest( `, ), }, - ["typescript", "babel-ts", "oxc-ts"], + [ + "typescript", + "babel-ts", + // `oxc-ts` not rejecting + // https://github.com/microsoft/TypeScript/issues/61834 + // https://github.com/microsoft/TypeScript/issues/42468 + // "oxc-ts", + ], );