Files

22 lines
613 B
JavaScript

import prettier from "../../config/prettier-entry.js";
// #13235
test("Plugin instance should not cached", async () => {
expect([
await prettier.format(".", {
plugins: [
{ parsers: { baz: { parse: () => ({}), astFormat: "baz-ast" } } },
{ printers: { "baz-ast": { print: () => "1" } } },
],
parser: "baz",
}),
await prettier.format(".", {
plugins: [
{ parsers: { baz: { parse: () => ({}), astFormat: "baz-ast" } } },
{ printers: { "baz-ast": { print: () => "2" } } },
],
parser: "baz",
}),
]).toStrictEqual(["1", "2"]);
});