Mocha 1.3.0
A relatively minor release this time but we’ve still got some cool new features!
Scrolling HTML reporter
The window will now scroll to follow along with larger test suites, and the statistics are fixed to the upper right-hand corner, a small but nice touch.
Custom reporters
Mocha has quite a few bundled reporters now, so future reporters that are not deemed important enough to provide the convenience of being in core should be published to npm. Some less important reporters may be removed from core and published to npm in the future.
This new feature also allows you to use localized private reporters. The --reporter NAME flag now behaves like require(), so for example you could do --reporter ./myreporter, or a third-party npm module such as --reporter lcov-reporter.
For details on creating and finding third-party reporters visit the wiki.
Grep inversion
The awesome --grep feature can now be inverted with the aptly named --invert flag. For example suppose you had tests tagged as @slow, and you wanted to run only slow tests you might use --grep @slow, however if you wanted to run only fast tests --grep @slow --invert would do the trick.
Along with this change --grep PATTERN is now escaped, meaning chars that used to behave as regexp special chars are now escaped.
Changelog
Here’s the full changelog:
1.3.0 / 2012-07-05
- add window scrolling to
HTMLreporter - add v8
--trace-*option support - add support for custom reports via
--reporter MODULE - add
--invertswitch to invert--grepmatches - fix export of
Nyanreporter. Closes #495 - fix escaping of
HTMLsuite titles. Closes #486 - fix
done()called multiple times with an error test - change
--grep- regexp escape the input