vitest 0.0.87 → 0.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -1
- package/dist/entry.js +4 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -631,7 +631,7 @@ class CAC extends EventEmitter {
|
|
|
631
631
|
|
|
632
632
|
const cac = (name = "") => new CAC(name);
|
|
633
633
|
|
|
634
|
-
var version = "0.0.
|
|
634
|
+
var version = "0.0.88";
|
|
635
635
|
|
|
636
636
|
const cli = cac("vitest");
|
|
637
637
|
cli.version(version).option("-r, --root <path>", "root path").option("-c, --config <path>", "path to config file").option("-u, --update", "update snapshot").option("-w, --watch", "watch mode").option("-o, --open", "open Vitest UI").option("--api", "listen to port and serve API").option("--threads", "enabled threads", { default: true }).option("--silent", "silent").option("--global", "inject apis globally").option("--dom", "mock browser api with happy-dom").option("--environment <env>", "runner environment", {
|
package/dist/entry.js
CHANGED
|
@@ -3707,7 +3707,11 @@ async function collectTests(paths, config) {
|
|
|
3707
3707
|
}
|
|
3708
3708
|
|
|
3709
3709
|
async function callSuiteHook(suite, name, args) {
|
|
3710
|
+
if (name === "beforeEach" && suite.suite)
|
|
3711
|
+
await callSuiteHook(suite.suite, name, args);
|
|
3710
3712
|
await Promise.all(getHooks(suite)[name].map((fn) => fn(...args)));
|
|
3713
|
+
if (name === "afterEach" && suite.suite)
|
|
3714
|
+
await callSuiteHook(suite.suite, name, args);
|
|
3711
3715
|
}
|
|
3712
3716
|
function updateTask(task) {
|
|
3713
3717
|
return rpc("onTaskUpdate", [task.id, task.result]);
|