Skip to content

Commit fff5b9f

Browse files
committed
Fix tests
1 parent d7dd273 commit fff5b9f

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

tests/config/run-format-test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,7 @@ const babelTsDisabledTests = new Set(
8585
),
8686
);
8787
const oxcDisabledTests = new Set();
88-
const oxcTsDisabledTests = new Set(
89-
[
90-
"typescript/conformance/types/functions/functionOverloadErrorsSyntax.ts",
91-
].map((file) => path.join(__dirname, "../format", file)),
92-
);
88+
const oxcTsDisabledTests = new Set();
9389
const hermesDisabledTests = new Set([
9490
...commentClosureTypecaseTests,
9591
...[

tests/format/typescript/conformance/types/functions/__snapshots__/format.test.js.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,16 @@ exports[`functionOverloadErrorsSyntax.ts [babel-ts] format 1`] = `
603603
Cause: Rest element must be last element. (9:35)"
604604
`;
605605
606+
exports[`functionOverloadErrorsSyntax.ts [oxc-ts] format 1`] = `
607+
"A rest parameter must be last in a parameter list (9:25)
608+
7 |
609+
8 | //Function overload signature with rest param followed by non-optional parameter
610+
> 9 | function fn5(x: string, ...y: any[], z: string);
611+
| ^^^^^^^^^^^
612+
10 | function fn5() { }
613+
11 |"
614+
`;
615+
606616
exports[`functionOverloadErrorsSyntax.ts format 1`] = `
607617
====================================options=====================================
608618
parsers: ["typescript"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
runFormatTest(import.meta, ["typescript"], {
22
errors: {
33
"babel-ts": ["functionOverloadErrorsSyntax.ts"],
4+
"oxc-ts": ["functionOverloadErrorsSyntax.ts"],
45
},
56
});

0 commit comments

Comments
 (0)