mirror of
https://github.com/hanzoai/prettier.git
synced 2026-09-24 17:02:04 +00:00
Co-authored-by: fisker Cheung <[email protected]> Co-authored-by: fisker <[email protected]> Co-authored-by: Jed Fox <[email protected]> Co-authored-by: seiya <[email protected]>
36 lines
784 B
JavaScript
36 lines
784 B
JavaScript
import commonmarkTestSuite from "commonmark-test-suite";
|
|
import gfmTestSuite from "gfm-test-suite";
|
|
|
|
const existsInCommonmarkTestSuite = new Set(
|
|
commonmarkTestSuite.latest.testCases.map(({ markdown }) => markdown),
|
|
);
|
|
|
|
const BUGS = new Set();
|
|
|
|
runFormatTest(
|
|
{
|
|
importMeta: import.meta,
|
|
snippets: gfmTestSuite.testCases
|
|
.map(({ section, markdown: input, example }) => {
|
|
if (existsInCommonmarkTestSuite.has(input)) {
|
|
return;
|
|
}
|
|
|
|
const filename = `example-${example}.md`;
|
|
|
|
if (BUGS.has(filename)) {
|
|
return;
|
|
}
|
|
|
|
return {
|
|
name: `${filename} (${section})`,
|
|
filename,
|
|
code: input,
|
|
};
|
|
})
|
|
.filter(Boolean),
|
|
},
|
|
["markdown"],
|
|
{ proseWrap: "always" },
|
|
);
|