Releases: mochajs/mocha
Releases · mochajs/mocha
v7.1.0
7.1.0 / 2020-02-26
🎉 Enhancements
#4038: Add Node.js native ESM support (@giltayar)
Mocha supports writing your test files as ES modules:
- Node.js only v12.11.0 and above
- Node.js below v13.2.0, you must set
--experimental-modules
option - current limitations: please check our documentation
- for programmatic usage: see API: loadFilesAsync()
Note: Node.JS native ECMAScript Modules implementation has status: Stability: 1 - Experimental
🐛 Fixes
- #4181: Programmatic API cannot access retried test objects (@juergba)
- #4174: Browser: fix
allowUncaught
option (@juergba)
📖 Documentation
- #4058: Manage author list in AUTHORS instead of
package.json
(@outsideris)
🔩 Other
- #4138: Upgrade ESLint v6.8 (@kaicataldo)
v7.0.1
7.0.1 / 2020-01-25
🐛 Fixes
- #4165: Fix exception when skipping tests programmatically (@juergba)
- #4153: Restore backwards compatibility for
reporterOptions
(@holm) - #4150: Fix recovery of an open test upon uncaught exception (@juergba)
- #4147: Fix regression of leaking uncaught exception handler (@juergba)
📖 Documentation
- #4146: Update copyright & trademark notices per OJSF (@boneskull)
- #4140: Fix broken links (@KyoungWan)
🔩 Other
v7.0.0-esm1 (experimental)
7.0.0-esm1 / 2020-01-12
This is an experimental release based on v7.0.0: npm i [email protected]
🎉 Enhancements
#4038: Add Node.js native ESM support (@giltayar)
Enables Mocha to load ECMAScript Modules test files, also valid for --file
option.
Limitations:
- Node.js only v12.11.0 and above
- Node.js below v13.2.0, you must set
--experimental-modules
option - ESM not (yet) supported for:
--watch
mode--require
option--reporter
custom reporters--ui
custom interfacesmocharc
configuration file
v7.0.0
7.0.0 / 2020-01-05
💥 Breaking Changes
- #3885: Drop Node.js v6.x support (@mojosoeun)
- #3890: Remove Node.js debug-related flags
--debug
/--debug-brk
and deprecatedebug
argument (@juergba) - #3962: Changes to command-line options (@ParkSB):
--list-interfaces
replaces--interfaces
--list-reporters
replaces--reporters
- Hook pattern of
this.skip()
(@juergba): - #3967: Remove deprecated
getOptions()
andlib/cli/options.js
(@juergba) - #4083: Uncaught exception in
pending
test: don't swallow, but retrospectively fail the test for correct exit code (@juergba) - #4004: Align
Mocha
constructor's option names with command-line options (@juergba)
🎉 Enhancements
- #3980: Refactor and improve
--watch
mode with chokidar (@geigerzaehler):- adds command-line options
--watch-files
and--watch-ignore
- removes
--watch-extensions
- adds command-line options
- #3979: Type "rs\n" to restart tests (@broofa)
📠 Deprecations
These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:
🐛 Fixes
- #4125: Fix timeout handling with
--inspect-brk
/--inspect
(@juergba) - #4070:
Mocha
constructor: improve browser setup (@juergba) - #4068: XUnit reporter should handle exceptions during diff generation (@rgroothuijsen)
- #4030: Fix
--allow-uncaught
withthis.skip()
(@juergba)
🔍 Coverage
📖 Documentation
- #4129: Fix broken links (@SaeromB)
- #4127: Add reporter alias names to docs (@khg0712)
- #4101: Clarify invalid usage of
done()
(@jgehrcke) - #4092: Replace
:coffee:
with emoji ☕️ (@pzrq) - #4088: Initial draft of project charter (@boneskull)
- #4066: Change
sh
tobash
for code block in docs/index.md (@HyunSangHan) - #4045: Update README.md concerning GraphicsMagick installation (@HyunSangHan)
- #3988: Fix sponsors background color for readability (@outsideris)
🔩 Other
v6.2.2
6.2.2 / 2019-10-18
🐛 Fixes
- #4025: Fix duplicate
EVENT_RUN_END
events upon uncaught exception (@juergba) - #4051: Fix "unhide" function in
html
reporter (browser) (@pec9399) - #4063: Fix use of esm in Node.js v8.x (@boneskull)
- #4033: Fix output when multiple async exceptions are thrown (@juergba)
📖 Documentation
- #4046: Site accessibility fixes (@Mia-jeong)
- #4026: Update docs for custom reporters in browser (@Lindsay-Needs-Sleep)
- #3971: Adopt new OpenJS Foundation Code of Conduct (@craigtaub)
v6.2.1
6.2.1 / 2019-09-29
🐛 Fixes
- #3955: tty.getWindowSize is not a function inside a "worker_threads" worker (@1999)
- #3970: remove extraGlobals() (@juergba)
- #3984: Update yargs-unparser to v1.6.0 (@juergba)
- #3983: Package 'esm': spawn child-process for correct loading (@juergba)
- #3986: Update yargs to v13.3.0 and yargs-parser to v13.1.1 (@juergba)
📖 Documentation
- #3886: fix styles on mochajs.org (@outsideris)
- #3966: Remove jsdoc index.html placeholder from eleventy file structure and fix broken link in jsdoc tutorial (@Munter)
- #3765: Add Matomo to website (@MarioDiaz98)
- #3947: Clarify effect of .skip() (@oliversalzburg)
v6.2.0
6.2.0 / 2019-07-18
🎉 Enhancements
- #3827: Do not fork child-process if no Node flags are present (@boneskull)
- #3725: Base reporter store ref to console.log, see mocha/wiki (@craigtaub)
🐛 Fixes
- #3960: Don't re-initialize grep option on watch re-run (@geigerzaehler)
- #3942: Fix "No test files found" Error when file is passed via
--file
(@gabegorelick) - #3914: Modify Mocha constructor to accept options
global
orglobals
(@pascalpp) - #3894: Fix parsing of config files with
_mocha
binary (@juergba) - #3834: Fix CLI parsing with default values (@boneskull, @juergba)
- #3831: Fix
--timeout
/--slow
string values and duplicate arguments (@boneskull, @juergba)
📖 Documentation
- #3906: Document option to define custom report name for XUnit reporter (@pkuczynski)
- #3889: Adds doc links for mocha-examples (@craigtaub)
- #3887: Fix broken links (@toyjhlee)
- #3841: Fix anchors to configuration section (@trescube)
🔍 Coverage
- #3915, #3929: Increase tests coverage for
--watch
options (@geigerzaehler)
🔩 Other
- #3953: Collect test files later, prepares improvements to the
--watch
mode behavior (@geigerzaehler) - #3939: Upgrade for npm audit (@boneskull)
- #3930: Extract
runWatch
into separate module (@geigerzaehler) - #3922: Add
mocha.min.js
file to stacktrace filter (@brian-lagerman) - #3919: Update CI config files to use Node-12.x (@plroebuck)
- #3892: Rework reporter tests (@plroebuck)
- #3872: Rename
--exclude
to--ignore
and create alias (@boneskull) - #3963: Hide stacktrace when cli args are missing (@outsideris)
- #3956: Do not redeclare variable in docs array example (@DanielRuf)
- #3957: Remove duplicate line-height property in
mocha.css
(@DanielRuf)
v6.1.4
6.1.4 / 2019-04-18
🔒 Security Fixes
- #3877: Upgrade js-yaml, addressing code injection vulnerability (@bjornstar)