Skip to content

Commit 763eaa4

Browse files
committed
Add test for help output
1 parent 05a177b commit 763eaa4

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

tests_integration/__tests__/__snapshots__/early-exit.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,8 @@ exports[`show detailed usage with --help write (stdout) 1`] = `
514514
515515
exports[`show detailed usage with --help write (write) 1`] = `Array []`;
516516
517+
exports[`show detailed usage with plugin options (write) 1`] = `Array []`;
518+
517519
exports[`show usage with --help (stderr) 1`] = `""`;
518520
519521
exports[`show usage with --help (stdout) 1`] = `

tests_integration/__tests__/early-exit.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@ describe(`show detailed usage with --help l (alias)`, () => {
2626
});
2727
});
2828

29+
describe(`show detailed usage with plugin options`, () => {
30+
runPrettier("cli", [
31+
"--help",
32+
"tab-width",
33+
"--plugin=../plugins/automatic/node_modules/prettier-plugin-bar",
34+
"--parser=bar"
35+
]).test({
36+
status: 0,
37+
stdout: `--tab-width <int>
38+
39+
Number of spaces per indentation level.
40+
41+
Default: 2
42+
Plugin defaults:
43+
* ../plugins/automatic/node_modules/prettier-plugin-bar: 4
44+
`,
45+
stderr: ""
46+
});
47+
});
48+
2949
commonUtil
3050
.arrayify(
3151
Object.assign(

tests_integration/plugins/automatic/node_modules/prettier-plugin-bar/index.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)