mocaccino

Mocha test runner as a Browserify plugin

MIT 47 个版本
安装
npm install mocaccino
yarn add mocaccino
pnpm add mocaccino
bun add mocaccino
README

mocaccino

Node.js CI SemVer License

Mocha test runner as a Browserify plugin.

Install

npm install mocaccino --save-dev

Real browser testing

This module is developed as part of Mochify which allows you to run tests with a headless browser, on a Selenium grid, in the cloud with SauceLabs or generates a standalone HTML page to run the tests. The underlying modules can also be used as Browserify plugins.

Code coverage with node

Use the Coverify transform and node:

$ browserify --bare -p [ mocaccino --node ] -t coverify test.js | node | coverify

Usage

Mocaccino is a browserify plugin:

browserify -p [ mocaccino OPTIONS ]

where OPTIONS are:

  --reporter, -R  Mocha reporter to use, defaults to "tap"
  --grep          Mocha grep option
  --fgrep         Mocha fgrep option
  --invert        Mocha invert option
  --timeout, -t   Mocha timeout in milliseconds to use, defaults to 2000
  --ui, -U        Mocha user interface to use, defaults to "bdd"
  --yields, -y    Yield every N milliseconds, defaults to 250
  --node          If result is used in node instead of a browser
  --windowWidth   Overrides the window width, defaults to the current shells
                  window width or fall back to 80
  --no-colors     Disable colors (overrides color support detection)
  --colors        Enable colors (overrides color support detection)
  --mochaPath     Path to custom Mocha module

The yields option causes a tiny delay every N milliseconds to allow pending I/O to happen. It's ignored if --node is given.

Compatibility

  • Node 12 or later
  • Browserify 5.9 or later (since version 1.0.0)
  • Browserify 4.x (before 1.0.0)

License

MIT

版本列表
6.1.0 2022-01-24
6.0.0 2021-12-28
5.0.0 2021-05-23
4.1.2 2019-10-09
4.1.1 2019-03-12
4.1.0 2019-02-28
4.0.0 2018-11-19
3.0.0 2017-11-08
2.0.0 2017-02-25
1.9.0 2017-02-21
1.8.2 2016-02-01
1.8.1 2016-01-28
1.8.0 2016-01-19
1.7.0 2016-01-13
1.6.1 2015-10-27
1.6.0 2015-10-22
1.5.2 2015-06-24
1.5.1 2015-03-25
1.5.0 2015-03-25
1.4.0 2015-03-08
1.3.0 2014-11-16
1.2.0 2014-10-25
1.1.0 2014-10-21
1.0.7 2014-09-29
1.0.6 2014-09-08
1.0.5 2014-08-24
1.0.4 2014-08-08
1.0.3 2014-08-07
1.0.1 2014-08-06
1.0.0 2014-08-06
0.8.0 2014-07-02
0.7.0 2014-06-12
0.6.4 2014-06-10
0.6.3 2014-06-06
0.6.2 2014-04-17
0.6.1 2014-04-16
0.6.0 2014-04-14
0.5.0 2014-03-30
0.4.2 2014-03-19
0.4.1 2014-03-19
0.4.0 2014-03-11
0.3.1 2014-02-23
0.3.0 2014-02-16
0.2.1 2014-02-03
0.2.0 2014-01-23
0.1.1 2014-01-11
0.1.0 2014-01-11