Skip to content

Commit 35cf39b

Browse files
khg0712juergba
authored andcommitted
Add reporter alias names to docs (#4127)
1 parent 3bd2d28 commit 35cf39b

File tree

1 file changed

+43
-15
lines changed

1 file changed

+43
-15
lines changed

docs/index.md

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,69 +1376,91 @@ Mocha reporters adjust to the terminal window, and always disable ANSI-escape co
13761376

13771377
### Spec
13781378

1379-
This is the default reporter. The "spec" reporter outputs a hierarchical view nested just as the test cases are.
1379+
Alias: `Spec`, `spec`
1380+
1381+
This is the default reporter. The Spec reporter outputs a hierarchical view nested just as the test cases are.
13801382

13811383
![spec reporter](images/reporter-spec.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
13821384
![spec reporter with failure](images/reporter-spec-fail.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
13831385

13841386
### Dot Matrix
13851387

1386-
The dot matrix (or "dot") reporter is simply a series of characters which represent test cases. Failures highlight in red exclamation marks (`!`), pending tests with a blue comma (`,`), and slow tests as yellow. Good if you prefer minimal output.
1388+
Alias: `Dot`, `dot`
1389+
1390+
The Dot Matrix reporter is simply a series of characters which represent test cases. Failures highlight in red exclamation marks (`!`), pending tests with a blue comma (`,`), and slow tests as yellow. Good if you prefer minimal output.
13871391

13881392
![dot matrix reporter](images/reporter-dot.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
13891393

13901394
### Nyan
13911395

1392-
The "nyan" reporter is exactly what you might expect:
1396+
Alias: `Nyan`, `nyan`
1397+
1398+
The Nyan reporter is exactly what you might expect:
13931399

13941400
![js nyan cat reporter](images/reporter-nyan.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
13951401

13961402
### TAP
13971403

1404+
Alias: `TAP`, `tap`
1405+
13981406
The TAP reporter emits lines for a [Test-Anything-Protocol][] consumer.
13991407

14001408
![test anything protocol](images/reporter-tap.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
14011409

14021410
### Landing Strip
14031411

1404-
The Landing Strip (`landing`) reporter is a gimmicky test reporter simulating a plane landing :) unicode ftw
1412+
Alias: `Landing`, `landing`
1413+
1414+
The Landing Strip reporter is a gimmicky test reporter simulating a plane landing :) unicode ftw
14051415

14061416
![landing strip plane reporter](images/reporter-landing.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
14071417
![landing strip with failure](images/reporter-landing-fail.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
14081418

14091419
### List
14101420

1411-
The "list" reporter outputs a simple specifications list as test cases pass or fail, outputting the failure details at the bottom of the output.
1421+
Alias: `List`, `list`
1422+
1423+
The List reporter outputs a simple specifications list as test cases pass or fail, outputting the failure details at the bottom of the output.
14121424

14131425
![list reporter](images/reporter-list.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
14141426

14151427
### Progress
14161428

1417-
The "progress" reporter implements a simple progress-bar:
1429+
Alias: `Progress`, `progress`
1430+
1431+
The Progress reporter implements a simple progress-bar:
14181432

14191433
![progress bar](images/reporter-progress.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
14201434

14211435
### JSON
14221436

1423-
The "JSON" reporter outputs a single large JSON object when the tests have completed (failures or not).
1437+
Alias: `JSON`, `json`
1438+
1439+
The JSON reporter outputs a single large JSON object when the tests have completed (failures or not).
14241440

14251441
![json reporter](images/reporter-json.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
14261442

14271443
### JSON Stream
14281444

1429-
The "JSON stream" reporter outputs newline-delimited JSON "events" as they occur, beginning with a "start" event, followed by test passes or failures, and then the final "end" event.
1445+
Alias: `JSONStream`, `json-stream`
1446+
1447+
The JSON Stream reporter outputs newline-delimited JSON "events" as they occur, beginning with a "start" event, followed by test passes or failures, and then the final "end" event.
14301448

14311449
![json stream reporter](images/reporter-json-stream.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
14321450

14331451
### Min
14341452

1435-
The "min" reporter displays the summary only, while still outputting errors on failure. This reporter works great with `--watch` as it clears the terminal in order to keep your test summary at the top.
1453+
Alias: `Min`, `min`
1454+
1455+
The Min reporter displays the summary only, while still outputting errors on failure. This reporter works great with `--watch` as it clears the terminal in order to keep your test summary at the top.
14361456

14371457
![min reporter](images/reporter-min.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
14381458

14391459
### Doc
14401460

1441-
The "doc" reporter outputs a hierarchical HTML body representation of your tests. Wrap it with a header, footer, and some styling, then you have some fantastic documentation!
1461+
Alias: `Doc`, `doc`
1462+
1463+
The Doc reporter outputs a hierarchical HTML body representation of your tests. Wrap it with a header, footer, and some styling, then you have some fantastic documentation!
14421464

14431465
![doc reporter](images/reporter-doc.png?withoutEnlargement&resize=920,9999){:class="screenshot" lazyload="on"}
14441466

@@ -1485,18 +1507,22 @@ View SuperAgent's [Makefile][superagent-makefile] for reference.
14851507

14861508
### Markdown
14871509

1488-
The "markdown" reporter generates a markdown TOC and body for your test suite.
1510+
Alias: `Markdown`, `markdown`
1511+
1512+
The Markdown reporter generates a markdown TOC and body for your test suite.
14891513
This is great if you want to use the tests as documentation within a Github
14901514
wiki page, or a markdown file in the repository that Github can render. For
14911515
example, here is the Connect [test output][connect-test-output].
14921516

14931517
### XUnit
14941518

1495-
The `xunit` reporter is also available. It outputs an XUnit-compatible XML document, often applicable in CI servers.
1519+
Alias: `XUnit`, `xunit`
1520+
1521+
The XUnit reporter is also available. It outputs an XUnit-compatible XML document, often applicable in CI servers.
14961522

1497-
By default, it will output to the console. To write directly to a file, use `--reporter-options output=filename.xml`.
1523+
By default, it will output to the console. To write directly to a file, use `--reporter-option output=filename.xml`.
14981524

1499-
To specify custom report title, use `--reporter-options suiteName="Custom name"`.
1525+
To specify custom report title, use `--reporter-option suiteName="Custom name"`.
15001526

15011527
### Third-Party Reporters
15021528

@@ -1509,6 +1535,8 @@ Examples:
15091535

15101536
### HTML Reporter
15111537

1538+
Alias: `HTML`, `html`
1539+
15121540
**The HTML reporter is not intended for use on the command-line.**
15131541

15141542
## Running Mocha in the Browser
@@ -1889,7 +1917,7 @@ or the [source](https://github.com/mochajs/mocha/blob/master/lib/mocha.js).
18891917
[example-mocha-test]: https://github.com/mochajs/mocha/tree/master/test
18901918
[example-mocha-config]: https://github.com/mochajs/mocha/tree/master/example/config
18911919
[example-superagent-test]: https://github.com/visionmedia/superagent/tree/master/test/node
1892-
[example-third-party-reporter]: https://github.com/mochajs/mocha-examples/tree/master/third-party-reporter
1920+
[example-third-party-reporter]: https://github.com/mochajs/mocha-examples/tree/master/packages/third-party-reporter
18931921
[example-typescript]: https://github.com/mochajs/mocha-examples/tree/master/packages/typescript
18941922
[example-websocket.io-test]: https://github.com/LearnBoost/websocket.io/tree/master/test
18951923
[expect.js]: https://github.com/LearnBoost/expect.js

0 commit comments

Comments
 (0)