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.
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
For details on creating and finding third-party reporters visit the wiki.
--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.
Here’s the full changelog:
1.3.0 / 2012-07-05
- add window scrolling to
- add v8
- add support for custom reports via
--invertswitch to invert
- fix export of
Nyanreporter. Closes #495
- fix escaping of
HTMLsuite titles. Closes #486
done()called multiple times with an error test
--grep- regexp escape the input