• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mochajs / mocha / 4986 / 7
91%
main: 94%

Build:
Build:
LAST BUILD BRANCH: Expresso
DEFAULT BRANCH: main
Ran 29 Nov 2018 10:20PM UTC
Files 43
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Nov 2018 10:01PM UTC coverage: 90.533% (-0.07%) from 90.599%
4986.7

push

travis-ci

boneskull
use yargs for option parsing and support config files

## BREAKING CHANGES

- `-d` is no longer an alias for `--debug`
- `--grep` and `--fgrep` are now mutually exclusive
- The option formerly known as `--compilers` is now removed from Mocha
- `lib/template.html` moved to `lib/browser/template.html`
- An error is thrown if a path to `mocha.opts` is specified by the user and the file was not found

## Soft Deprecations

### CLI

- `-gc` users should use `--gc-global`

### Programmatic API

- Public API method `getOptions()` in `bin/options.js` is deprecated and currently has no alternative
- Users of the `enableTimeouts` option of the `Mocha` constructor should use `timeout` instead.  Specify `false` for no timeout
- Users of the `useColors` option of the `Mocha` constructor should use `color` instead

## Enhancements

- Mocha now supports JS, JSON, YAML, or `package.json`-based config.
- Any/all configuration, including `mocha.opts` can be used in addition to command-line arguments, and everything will be merged as applicable
- Node/V8 flag support:
  - Support of all available `node` flags on a *per-version* basis
  - Support of any V8 flag by prepending `--v8-` to the option
  - These are supported within `mocha.opts` or config files
- More flexible command-line parsing including negation of any boolean flag by prepending `--no-` to the name
- Better `--help`
- Descriptions of interfaces in `--help` text
- A useful `Mocha` constructor
- Debug-related flags (e.g., `--inspect`) now *imply* `--no-timeouts`

## Fixes

- Many bug fixes around CLI option handling, e.g., closes #3475
- Fixes #3363, #2576
- `--no-timeouts` works

## Documentation

- Added new, updated, or rewrote documentation for all non-self-explanatory options
- Updated usage text, TOC
- Added section on configuration
- Added example configuration files in `example/config/`

## Etc.

- Updated many dev deps, mostly within existing semver ranges
- Removed `commander`
- Added production de... (continued)

904 of 1105 branches covered (81.81%)

2362 of 2609 relevant lines covered (90.53%)

437.01 hits per line

Source Files on job 4986.7
  • Tree
  • List 0
  • Changed 24
  • Source Changed 23
  • Coverage Changed 20
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 4602
  • Travis Job 4986.7
  • bc449e8c on github
  • Prev Job for on yargs (#4959.7)
  • Next Job for on yargs (#4994.7)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc