Remove an invalid test case (#18692)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-01-21 02:02:12 +08:00
1 parent cca95e5271
commit 9ebc4a7142
7 files changed
+8 -58

No files matched your search

@@ -3708,20 +3708,20 @@ Cause: A parameter property is only allowed in a constructor implementation."
exports[`snippet: #167 [babel-ts] format 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:33)
> 1 | class Foo {['const' + 'ructor'](private parameter) {}}
> 1 | class Foo {['construct' + 'or'](private parameter) {}}
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:32)"
`;
exports[`snippet: #167 [oxc-ts] format 1`] = `
"'private' modifier cannot appear on a parameter. (1:33)
> 1 | class Foo {['const' + 'ructor'](private parameter) {}}
> 1 | class Foo {['construct' + 'or'](private parameter) {}}
| ^^^^^^^"
`;
exports[`snippet: #167 [typescript] format 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:33)
> 1 | class Foo {['const' + 'ructor'](private parameter) {}}
> 1 | class Foo {['construct' + 'or'](private parameter) {}}
| ^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
@@ -124,8 +124,7 @@ runFormatTest(
'class Foo {["constructor"](private parameter) {}}',
"class Foo {['constructor'](private parameter) {}}",
"class Foo {[`constructor`](private parameter) {}}",
// cspell:disable-next-line
"class Foo {['const' + 'ructor'](private parameter) {}}",
"class Foo {['construct' + 'or'](private parameter) {}}",
// `TSPropertySignature`
...POSSIBLE_MODIFIERS.filter((modifier) => modifier !== "readonly").map(