Comparing version 8.0.0 to 8.0.1
@@ -0,1 +1,9 @@ | ||
# 8.0.1 / 2020-06-10 | ||
The obligatory patch after a major. | ||
## :bug: Fixes | ||
- [#4328]: Fix `--parallel` when combined with `--watch` ([**@boneskull**](https://github.com/boneskull)) | ||
# 8.0.0 / 2020-06-10 | ||
@@ -2,0 +10,0 @@ |
@@ -39,7 +39,29 @@ 'use strict'; | ||
beforeRun({mocha}) { | ||
mocha.files = collectFiles(fileCollectParams); | ||
// I don't know why we're cloning the root suite. | ||
const rootSuite = mocha.suite.clone(); | ||
// this `require` is needed because the require cache has been cleared. the dynamic | ||
// exports set via the below call to `mocha.ui()` won't work properly if a | ||
// test depends on this module (see `required-tokens.spec.js`). | ||
const Mocha = require('../mocha'); | ||
// ... and now that we've gotten a new module, we need to use it again due | ||
// to `mocha.ui()` call | ||
const newMocha = new Mocha(mocha.options); | ||
// don't know why this is needed | ||
newMocha.suite = rootSuite; | ||
// nor this | ||
newMocha.suite.ctx = new Context(); | ||
// reset the list of files | ||
newMocha.files = collectFiles(fileCollectParams); | ||
// because we've swapped out the root suite (see the `run` inner function | ||
// in `createRerunner`), we need to call `mocha.ui()` again to set up the context/globals. | ||
newMocha.ui(newMocha.options.ui); | ||
// in parallel mode, the main Mocha process doesn't actually load the | ||
// files. this flag prevents `mocha.run()` from autoloading. | ||
mocha.lazyLoadFiles(true); | ||
return mocha; | ||
newMocha.lazyLoadFiles(true); | ||
return newMocha; | ||
}, | ||
@@ -46,0 +68,0 @@ afterRun({watcher}) { |
{ | ||
"name": "mocha", | ||
"version": "8.0.0", | ||
"version": "8.0.1", | ||
"description": "simple, flexible, fun test framework", | ||
@@ -84,3 +84,3 @@ "keywords": [ | ||
"@mocha/docdash": "^2.1.3", | ||
"assetgraph-builder": "^8.0.0", | ||
"assetgraph-builder": "^8.0.1", | ||
"autoprefixer": "^9.7.4", | ||
@@ -87,0 +87,0 @@ "babel-eslint": "^10.1.0", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
976666
27335