Comparing version 8.3.0 to 8.3.1
@@ -0,1 +1,8 @@ | ||
# 8.3.1 / 2021-03-06 | ||
## :bug: Fixes | ||
- [#4577](https://github.com/mochajs/mocha/issues/4577): Browser: fix `EvalError` caused by regenerator-runtime ([**@snoack**](https://github.com/snoack)) | ||
- [#4574](https://github.com/mochajs/mocha/issues/4574): ESM: allow `import` from mocha in parallel mode ([**@nicojs**](https://github.com/nicojs)) | ||
# 8.3.0 / 2021-02-11 | ||
@@ -2,0 +9,0 @@ |
@@ -99,2 +99,48 @@ 'use strict'; | ||
let currentContext; | ||
exports.afterEach = function(...args) { | ||
(currentContext.afterEach || currentContext.teardown).apply(this, args); | ||
}; | ||
exports.after = function(...args) { | ||
(currentContext.after || currentContext.suiteTeardown).apply(this, args); | ||
}; | ||
exports.beforeEach = function(...args) { | ||
(currentContext.beforeEach || currentContext.setup).apply(this, args); | ||
}; | ||
exports.before = function(...args) { | ||
(currentContext.before || currentContext.suiteSetup).apply(this, args); | ||
}; | ||
exports.describe = function(...args) { | ||
(currentContext.describe || currentContext.suite).apply(this, args); | ||
}; | ||
exports.describe.only = function(...args) { | ||
(currentContext.describe || currentContext.suite).only.apply(this, args); | ||
}; | ||
exports.describe.skip = function(...args) { | ||
(currentContext.describe || currentContext.suite).skip.apply(this, args); | ||
}; | ||
exports.it = function(...args) { | ||
(currentContext.it || currentContext.test).apply(this, args); | ||
}; | ||
exports.it.only = function(...args) { | ||
(currentContext.it || currentContext.test).only.apply(this, args); | ||
}; | ||
exports.it.skip = function(...args) { | ||
( | ||
currentContext.xit || | ||
(currentContext.test && currentContext.test.skip) | ||
).apply(this, args); | ||
}; | ||
exports.xdescribe = exports.describe.skip; | ||
exports.xit = exports.it.skip; | ||
exports.setup = exports.beforeEach; | ||
exports.suiteSetup = exports.before; | ||
exports.suiteTeardown = exports.after; | ||
exports.suite = exports.describe; | ||
exports.teardown = exports.afterEach; | ||
exports.test = exports.it; | ||
exports.run = function(...args) { | ||
currentContext.run.apply(this, args); | ||
}; | ||
/** | ||
@@ -355,16 +401,3 @@ * Constructs a new Mocha instance with `options`. | ||
this.suite.on(EVENT_FILE_PRE_REQUIRE, function(context) { | ||
exports.afterEach = context.afterEach || context.teardown; | ||
exports.after = context.after || context.suiteTeardown; | ||
exports.beforeEach = context.beforeEach || context.setup; | ||
exports.before = context.before || context.suiteSetup; | ||
exports.describe = context.describe || context.suite; | ||
exports.it = context.it || context.test; | ||
exports.xit = context.xit || (context.test && context.test.skip); | ||
exports.setup = context.setup || context.beforeEach; | ||
exports.suiteSetup = context.suiteSetup || context.before; | ||
exports.suiteTeardown = context.suiteTeardown || context.after; | ||
exports.suite = context.suite || context.describe; | ||
exports.teardown = context.teardown || context.afterEach; | ||
exports.test = context.test || context.it; | ||
exports.run = context.run; | ||
currentContext = context; | ||
}); | ||
@@ -1304,3 +1337,3 @@ | ||
* Defined in a {@link PluginDefinition}. | ||
* @callback PluginValidator | ||
@@ -1307,0 +1340,0 @@ * @param {*} value - Value to check |
{ | ||
"name": "mocha", | ||
"version": "8.3.0", | ||
"version": "8.3.1", | ||
"description": "simple, flexible, fun test framework", | ||
@@ -84,3 +84,3 @@ "keywords": [ | ||
"@11ty/eleventy-plugin-inclusive-language": "^1.0.0", | ||
"@babel/preset-env": "^7.11.0", | ||
"@babel/preset-env": "^7.12.17", | ||
"@mocha/docdash": "^3.0.1", | ||
@@ -87,0 +87,0 @@ "@rollup/plugin-babel": "^5.1.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
37760
3071677