Enable tests fixed in yaml-test-suite (#19275)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-06-03 07:38:31 +08:00
1 parent 121d0d3dd9
commit d9e261f836
2 files changed
+66 -16

No files matched your search

@@ -65,6 +65,21 @@ parsers: ["yaml"]
================================================================================
`;
exports[`snippet: 2JQS.yaml - Block Mapping with Missing Keys format 1`] = `
====================================options=====================================
parsers: ["yaml"]
printWidth: 80 (default) |
=====================================input======================================
: a
: b
=====================================output=====================================
: a
: b
================================================================================
`;
exports[`snippet: 2LFX.yaml - Spec Example 6.13. Reserved Directives [1.3] format 1`] = `
====================================options=====================================
parsers: ["yaml"]
@@ -3931,6 +3946,37 @@ implicit block key: [implicit flow key: value]
================================================================================
`;
exports[`snippet: L24T.yaml - Trailing line of spaces format 1`] = `
====================================options=====================================
parsers: ["yaml"]
printWidth: 80 (default) |
=====================================input======================================
foo: |
x
=====================================output=====================================
foo: |
x
================================================================================
`;
exports[`snippet: L24T-2.yaml - Trailing line of spaces format 1`] = `
====================================options=====================================
parsers: ["yaml"]
printWidth: 80 (default) |
=====================================input======================================
foo: |
x
=====================================output=====================================
foo: |
x
================================================================================
`;
exports[`snippet: L94M.yaml - Tags in Explicit Mapping format 1`] = `
====================================options=====================================
parsers: ["yaml"]
@@ -5836,6 +5882,23 @@ key: &an:chor value
================================================================================
`;
exports[`snippet: Y79Y-2.yaml - Tabs in various contexts format 1`] = `
====================================options=====================================
parsers: ["yaml"]
printWidth: 80 (default) |
=====================================input======================================
foo: |
bar: 1
=====================================output=====================================
foo: |
bar: 1
================================================================================
`;
exports[`snippet: Y79Y-3.yaml - Tabs in various contexts format 1`] = `
====================================options=====================================
parsers: ["yaml"]
@@ -1,24 +1,11 @@
import yamlTestSuite from "yaml-test-suite";
// https://github.com/eemeli/yaml/blob/086fa6b5bae325da18734750cddee231ce578930/tests/yaml-test-suite.ts#L19
// https://github.com/prettier/yaml-unist-parser/blob/7b29a97bc3c1b98688a0b87709855e430735bb31/src/yaml-test-suite.test.ts#L4
const SKIP = new Set([
//
"2JQS.yaml",
"9MMA.yaml",
"SF5V.yaml",
// Bug: https://github.com/eemeli/yaml/issues/646
"M5DY.yaml",
]);
// https://github.com/prettier/prettier/issues/18302
const BUGS = new Set([
//
"Y79Y-2.yaml",
"DE56-3.yaml",
"DE56-4.yaml",
"L24T.yaml",
"L24T-2.yaml",
// Bug: https://github.com/eemeli/yaml/issues/646
"M5DY.yaml",
]);
runFormatTest(
@@ -33,7 +20,7 @@ runFormatTest(
const filename = `${id}${index === 0 ? "" : `-${index + 1}`}.yaml`;
if (SKIP.has(filename) || BUGS.has(filename)) {
if (BUGS.has(filename)) {
// console.log(testCase);
return;
}