Files

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

41 lines
798 B
JavaScript
Raw Permalink Normal View History

describe("plugin default options should work", () => {
runCli(
"plugins/defaultOptions",
2020-01-14 18:54:26 +08:00
[
"--stdin-filepath",
"example.foo",
"--plugin=./plugin.cjs",
2020-01-14 18:54:26 +08:00
"--no-editorconfig",
],
{ input: "hello-world" },
).test({
stdout: JSON.stringify({
tabWidth: 8,
bracketSpacing: false,
}),
stderr: "",
status: 0,
write: [],
});
});
describe("overriding plugin default options should work", () => {
runCli(
"plugins/defaultOptions",
[
"--stdin-filepath",
"example.foo",
"--plugin=./plugin.cjs",
"--tab-width=4",
],
{ input: "hello-world" },
).test({
stdout: JSON.stringify({
tabWidth: 4,
bracketSpacing: false,
}),
stderr: "",
status: 0,
write: [],
});
});