@@ -26,7 +26,6 @@ Mocha is a feature-rich JavaScript test framework running on [Node.js][] and in
26
26
- [ async test timeout support] ( #delayed-root-suite )
27
27
- [ test retry support] ( #retry-tests )
28
28
- [ test-specific timeouts] ( #test-level )
29
- - [ Growl support] ( #desktop-notification-support )
30
29
- [ reports test durations] ( #test-duration )
31
30
- [ highlights slow tests] ( #dot-matrix )
32
31
- [ file watcher support] ( #min )
@@ -999,12 +998,6 @@ Enable "full" stack traces. By default, Mocha attempts to distill stack traces i
999
998
1000
999
This flag is helpful when debugging a suspected issue within Mocha or Node.js itself.
1001
1000
1002
- ### ` --growl, -G `
1003
-
1004
- Enable [ Growl] [ ] (or OS-level notifications where available).
1005
-
1006
- Requires extra software to be installed; see the [ growl module's docs] [ npm-growl ] for more information.
1007
-
1008
1001
### ` --inline-diffs `
1009
1002
1010
1003
Enable "inline" diffs, an alternative output for diffing strings.
@@ -2191,71 +2184,6 @@ The HTML reporter is the default reporter when running Mocha in the browser. It
2191
2184
2192
2185
[ Mochawesome] [ npm-mochawesome ] is a great alternative to the default HTML reporter.
2193
2186
2194
- ## Desktop Notification Support
2195
-
2196
- Desktop notifications allow asynchronous communication of events without
2197
- forcing you to react to a notification immediately. Their appearance
2198
- and specific functionality vary across platforms. They typically disappear
2199
- automatically after a short delay, but their content is often stored in some
2200
- manner that allows you to access past notifications.
2201
-
2202
- [ Growl] [ ] was an early notification system implementation for OS X and Windows,
2203
- hence, the name of Mocha's ` --growl ` option.
2204
-
2205
- Once enabled, when your root suite completes test execution, a desktop
2206
- notification should appear informing you whether your tests passed or failed.
2207
-
2208
- ### Node-based notifications
2209
-
2210
- In order to use desktop notifications with the command-line interface (CLI),
2211
- you ** must** first install some platform-specific prerequisite software.
2212
- Instructions for doing so can be found [ here] [ mocha-wiki-growl ] .
2213
-
2214
- Enable Mocha's desktop notifications as follows:
2215
-
2216
- ``` bash
2217
- $ mocha --growl
2218
- ```
2219
-
2220
- ### Browser-based notifications
2221
-
2222
- Web notification support is being made available for current versions of
2223
- modern browsers. Ensure your browser version supports both
2224
- [ promises] [ caniuse-promises ] and [ web notifications] [ caniuse-notifications ] .
2225
- As the Notification API evolved over time, ** do not expect** the minimum
2226
- possible browser version to necessarily work.
2227
-
2228
- Enable Mocha's web notifications with a slight modification to your
2229
- client-side mocha HTML. Add a call to ` mocha.growl() ` prior to running your
2230
- tests as shown below:
2231
-
2232
- ``` html
2233
- <!DOCTYPE html>
2234
- <html lang =" en" >
2235
- <head >
2236
- <meta charset =" utf-8" />
2237
- <title >Mocha Tests</title >
2238
- <meta name =" viewport" content =" width=device-width, initial-scale=1.0" />
2239
- <link rel =" stylesheet" href =" https://unpkg.com/mocha/mocha.css" />
2240
- </head >
2241
- <body >
2242
- <div id =" mocha" ></div >
2243
-
2244
- <script src =" https://unpkg.com/chai/chai.js" ></script >
2245
- <script src =" https://unpkg.com/mocha/mocha.js" ></script >
2246
-
2247
- <script class =" mocha-init" >
2248
- mocha .setup (' bdd' );
2249
- mocha .growl (); // <-- Enables web notifications
2250
- </script >
2251
- <script src =" test.spec.js" ></script >
2252
- <script class =" mocha-exec" >
2253
- mocha .run ();
2254
- </script >
2255
- </body >
2256
- </html >
2257
- ```
2258
-
2259
2187
## Configuring Mocha (Node.js)
2260
2188
2261
2189
> _ New in v6.0.0_
@@ -2422,8 +2350,7 @@ $ npm test
2422
2350
2423
2351
In addition to chatting with us on [ Gitter] [ gitter-mocha ] , for additional information such as using
2424
2352
spies, mocking, and shared behaviours be sure to check out the [ Mocha Wiki] [ mocha-wiki ] on GitHub.
2425
- For discussions join the [ Google Group] [ google-mocha ] . For a running example of Mocha, view
2426
- [ example/tests.html] ( example/tests.html ) . For the JavaScript API, view the [ API documentation] ( api/ )
2353
+ For a running example of Mocha, view [ example/tests.html] ( example/tests.html ) . For the JavaScript API, view the [ API documentation] ( api/ )
2427
2354
or the [ source] ( https://github.com/mochajs/mocha/blob/master/lib/mocha.js ) .
2428
2355
2429
2356
[ // ] : # ' Cross reference section '
@@ -2452,8 +2379,6 @@ or the [source](https://github.com/mochajs/mocha/blob/master/lib/mocha.js).
2452
2379
[ gist-async-hooks ] : https://git.io/vdlNM
2453
2380
[ gist-globbing-tutorial ] : https://gist.github.com/reggi/475793ea1846affbcfe8
2454
2381
[ gitter-mocha ] : https://gitter.im/mochajs/mocha
2455
- [ google-mocha ] : https://groups.google.com/group/mochajs
2456
- [ growl ] : http://growl.info/
2457
2382
[ jetbrains ] : https://www.jetbrains.com/
2458
2383
[ jetbrains-plugin ] : https://www.jetbrains.com/idea/features/nodejs.html
2459
2384
[ mdn-array-sort ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
@@ -2467,7 +2392,6 @@ or the [source](https://github.com/mochajs/mocha/blob/master/lib/mocha.js).
2467
2392
[ mocha-website ] : https://mochajs.org/
2468
2393
[ mocha-wiki ] : https://github.com/mochajs/mocha/wiki
2469
2394
[ mocha-wiki-compilers ] : https://github.com/mochajs/mocha/wiki/compilers-deprecation
2470
- [ mocha-wiki-growl ] : https://github.com/mochajs/mocha/wiki/Growl-Notifications
2471
2395
[ mocha-wiki-more-reporters ] : https://github.com/mochajs/mocha/wiki/Third-party-reporters
2472
2396
[ node.js ] : https://nodejs.org/
2473
2397
[ node-assert ] : https://nodejs.org/api/assert.html
@@ -2477,7 +2401,6 @@ or the [source](https://github.com/mochajs/mocha/blob/master/lib/mocha.js).
2477
2401
[ npm-babel-register ] : https://npm.im/@babel/register
2478
2402
[ npm-chai-as-promised ] : https://www.npmjs.com/package/chai-as-promised
2479
2403
[ npm-glob ] : https://www.npmjs.com/package/glob
2480
- [ npm-growl ] : https://npm.im/growl
2481
2404
[ npm-mocha-lcov-reporter ] : https://npm.im/mocha-lcov-reporter
2482
2405
[ npm-mochawesome ] : https://npm.im/mochawesome
2483
2406
[ npm-should.js ] : https://npm.im/should
0 commit comments