Files
test-repo/tests/integration/__tests__/plugin-cache.js
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
613 B
JavaScript
Raw Normal View History

2023-03-24 13:19:18 +08:00
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"]);
2023-03-24 13:19:18 +08:00
});