45 lines
766 B
JavaScript
45 lines
766 B
JavaScript
runFormatTest(
|
|||
|
|
{
|
||
|
|
snippets: [
|
||
|
|
".js",
|
||
|
|
".cjs",
|
||
|
|
".mjs",
|
||
|
|
".jsx",
|
||
|
|
".ts",
|
||
|
|
".mts",
|
||
|
|
".cts",
|
||
|
|
".tsx",
|
||
|
|
".unset-filepath",
|
||
|
|
].map((extension) => {
|
||
|
|
const filename = `test${extension}`;
|
||
|
|
return {
|
||
|
|
name: filename,
|
||
|
|
code: "<div />",
|
||
|
|
filename,
|
||
|
|
};
|
||
|
|
}),
|
||
|
|
importMeta: import.meta,
|
||
|
|
},
|
||
|
|
[
|
||
|
|
"babel",
|
||
|
|
"babel-ts",
|
||
|
|
"acorn",
|
||
|
|
"espree",
|
||
|
|
"flow",
|
||
|
|
"meriyah",
|
||
|
|
"typescript",
|
||
|
|
"hermes",
|
||
|
|
"oxc",
|
||
|
|
"oxc-ts",
|
||
|
|
"yuku",
|
||
|
|
"yuku-ts",
|
||
|
|
"__babel_estree",
|
||
|
|
],
|
||
|
|
{
|
||
|
|
errors: {
|
||
|
|
typescript: ["test.ts", "test.mts", "test.cts"],
|
||
|
|
"oxc-ts": ["test.ts", "test.mts", "test.cts"],
|
||
|
|
"yuku-ts": ["test.ts", "test.mts", "test.cts"],
|
||
|
|
},
|
||
|
|
},
|
||
|
|
);
|