Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes:
Updated a lot of dependencies
Simply updated
\
is now only used as an escape character, and never as a path separator in glob patterns, so that Windows users have a way to match against filenames containing literal glob pattern characters.\
is an escape character to match literal glob pattern characters.--grep
and--fgrep
are now mutually exclusive; attempting to use both will cause Mocha to fail instead of simply ignoring--grep
--compilers
is no longer supported; attempting to use will cause Mocha to fail with a link to more information-d
is no longer an alias for--debug
;-d
is currently ignored--watch-extensions
no longer impliesjs
; it must be explicitly added (@TheDancingCode)tap
reporter emits error messages (@chrmod)before
hook, subsequentbefore
hooks and tests in nested suites are now skipped (@bannmoore)lib/template.html
has moved tolib/browser/template.html
(@boneskull)mocha.opts
at a user-specified path (@plroebuck)Base
-extending reporter without aRunner
parameter will throw an exception (@craigtaub)code
property (and some will have additional metadata). SomeError
messages have changed. Please use thecode
property to checkError
types instead of themessage
property; these descriptions will be localized in the future. (@craigtaub)--debug
/--debug-brk
and deprecatedebug
argument (@juergba)list-
to --interfaces and --reporters options mochajs/mocha#3962: Changes to command-line options (@ParkSB):--list-interfaces
replaces--interfaces
--list-reporters
replaces--reporters
this.skip()
(@juergba):it
test, relatedafterEach
hooks are now executedbeforeEach
hook, subsequent innerbeforeEach
hooks are now skipped and relatedafterEach
hooks are executedthis.skip()
within after hooksgetOptions()
andlib/cli/options.js
(@juergba)pending
test: don't swallow, but retrospectively fail the test for correct exit code (@juergba)Mocha
constructor's option names with command-line options (@juergba)mocha.opts
is no longer supported (@juergba)✨ WORKAROUND: Replace
mocha.opts
with a configuration file.enableTimeout()
(this.enableTimeout()
) from the context object (@craigtaub)✨ WORKAROUND: Replace usage of
this.enableTimeout(false)
in your tests withthis.timeout(0)
.spec
option no longer supports a comma-delimited list of files (@juergba)✨ WORKAROUND: Use an array instead (e.g.,
"spec": "foo.js,bar.js"
becomes"spec": ["foo.js", "bar.js"]
).--forbid-only
will throw an error even if exclusive tests are avoided via--grep
or other means (@arvidOtt)skip()
(this.skip()
) in a "before all" (before()
) hook will no longer execute subsequent sibling hooks, in addition to hooks in child suites (@juergba)Mocha.prototype.ignoreLeaks()
Mocha.prototype.useColors()
Mocha.prototype.useInlineDiffs()
Mocha.prototype.hideDiff()
import
-first loading of test files (@giltayar)Mocha is going ESM-first! This means that it will now use ESM
import(test_file)
to load the test files, instead of the CommonJSrequire(test_file)
. This is not a problem, asimport
can also load most files thatrequire
does. In the rare cases where this fails, it will fallback torequire(...)
. This ESM-first approach is the next step in Mocha's ESM migration, and allows ESM loaders to load and transform the test file.utils.lookupFiles()
(@juergba)actual
/expected
fordiff
generation (@juergba)bin/mocha
tobin/mocha.js
(@juergba)--ignore
option in Windows: upgrade Minimatch (@juergba)Runner
signature (@juergba)minimist
, no Breaking changes within CHANGELOGfs-extra
, no Breaking changes within CHANGELOGjshint
, no Breaking changes within CHANGELOGhttp-auth
, no Breaking changes within CHANGELOGglob
, Breaking Changes according to CHANGELOG:\
is now only used as an escape character, and never as a path separator in glob patterns, so that Windows users have a way to match against filenames containing literal glob pattern characters.\
is an escape character to match literal glob pattern characters.cwd
androot
will always be automatically coerced to use/
as path separators on Windows, as they cannot contain glob patterns anyway, and are often supplied bypath.resolve()
and other methods that will use\
path separators by default.jsdoc-to-markdown
, Breaking Changes according to CHANGELOG:markdown-it
, no Breaking Changes according to CHANGELOGrewire
, Breaking Changes according to CHANGELOG:event-stream
, no Breaking Changes according to CHANGELOG@reach/visually-hidden
, no Breaking Changes according to CHANGELOGarchiver
, no Breaking Changes according to CHANGELOGdeepmerge
, no Breaking Changes according to CHANGELOGwebpack
, simply updated by major version