Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
28 lines
712 B
JavaScript
28 lines
712 B
JavaScript
const blockStyles = ["|", ">", "|+", "|-", ">+", ">-"];
|
|
const trailingSpace = ["", " ".repeat(3), " \t"];
|
|
const newlines = ["", "\n", "\n\n", "\n".repeat(3)];
|
|
|
|
const snippets = blockStyles.flatMap((blockStyle) =>
|
|
trailingSpace.flatMap((space) =>
|
|
newlines.flatMap((lines) =>
|
|
[
|
|
`foo: ${blockStyle}\n${lines}`,
|
|
// `foo: ${blockStyle}\n ${space}${lines}`,
|
|
`foo: ${blockStyle}\n x\n${lines}`,
|
|
`foo: ${blockStyle}\n x\n${space}\n${lines}`,
|
|
].flatMap((code) => [code, `${code}\n...`]),
|
|
),
|
|
),
|
|
);
|
|
|
|
runFormatTest(
|
|
{
|
|
importMeta: import.meta,
|
|
snippets: snippets.map((code) => ({
|
|
name: JSON.stringify(code),
|
|
code,
|
|
})),
|
|
},
|
|
["yaml"],
|
|
);
|