@@ -11,7 +11,7 @@ Test runner for testing TypeScript typings (CLI over
11
11
- :mag : [ Glob] [ intro_fast-glob ] pattern matching
12
12
- :white_check_mark : [ TAP] [ intro_tap ] compatible output
13
13
14
- ![ tsd-lite-cli default tap output] ( docs/reporter-tap .png " tsd-lite-cli default tap output ")
14
+ ![ tsd-lite-cli default colored tap output] ( docs/default-output .png " tsd-lite-cli default colored tap output ")
15
15
16
16
[ intro_tsd ] : https://github.com/SamVerschueren/tsd
17
17
[ intro_tsd-lite ] : https://github.com/mrazauskas/tsd-lite
@@ -26,7 +26,7 @@ Test runner for testing TypeScript typings (CLI over
26
26
- [ Usage] ( #usage )
27
27
- [ Example typing test file] ( #example-typing-test-file )
28
28
- [ CLI interface] ( #cli-interface )
29
- - [ Reporters ] ( #reporters )
29
+ - [ ` --color ` and ` --no-color ` ] ( #--color-and---no-color )
30
30
- [ Similar projects] ( #similar-projects )
31
31
- [ Changelog] ( #changelog )
32
32
@@ -66,31 +66,34 @@ For more information, see [tsd-lite][example_tsd-lite] for assertion syntax.
66
66
67
67
## CLI interface
68
68
69
- ``` console
70
- $ npx tsd-lite --help
71
-
69
+ ``` shell-session
72
70
Usage: tsd-lite [options] <patterns...>
73
71
74
72
Test runner for testing TypeScript typings (CLI over tsd-lite, a "per file"
75
73
version of tsd)
76
74
77
75
Arguments:
78
- patterns Glob patterns for matching test files
76
+ patterns Glob patterns for matching test files
79
77
80
78
Options:
81
- -v, --version Print version number
82
- -r, --reporter <name> Print test results using reporter
83
- (choices: "tap", "fancy", default: "tap")
84
- -h, --help Print this help guide
79
+ -v, --version Print version number
80
+ -c, --color Output colored TAP for better human consumption. Disabled in
81
+ CI environments if not explicitly set (default: true)
82
+ --no-color Disable colored TAP, usefull when piping to other tools
83
+ -h, --help Print this help guide
85
84
```
86
85
87
- ### Reporters
86
+ ### ` --color ` and ` --no-color `
87
+
88
+ By default, ` tsd-lite-cli ` outputs a colored version of [ Test Anything
89
+ Protocol] [ cli_tap ] for better readability. This can be disabled by setting
90
+ ` --no-color ` when piping to other tools like ` tap-spec ` :
88
91
89
- By default, ` tsd-lite-cli ` writes [ Test Anything Protocol ] [ cli_tap ] compatible
90
- output, but you can also use the ` fancy ` reporter, which writes a more
91
- human-friendly output:
92
+ ``` shell-session
93
+ npx tsd-lite 'src/**/*.test-d.ts' --no-color | npx tap-spec
94
+ ```
92
95
93
- ![ tsd-lite-cli fancy output] ( docs/reporter-fancy .png " tsd-lite-cli fancy output ")
96
+ ![ tsd-lite-cli --no-color output piped to tap-spec ] ( docs/output-no-color_tap-spec .png " tsd-lite-cli --no-color output piped to tap-spec ")
94
97
95
98
[ cli_tap ] : https://testanything.org
96
99
0 commit comments