Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vitest/runner

Package Overview
Dependencies
Maintainers
4
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitest/runner - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

18

dist/index.js

@@ -669,2 +669,12 @@ import limit from 'p-limit';

}
async function callTaskHooks(task, hooks, sequence) {
if (sequence === "stack")
hooks = hooks.slice().reverse();
if (sequence === "parallel") {
await Promise.all(hooks.map((fn) => fn(task.result)));
} else {
for (const fn of hooks)
await fn(task.result);
}
}
async function callSuiteHook(suite, currentTask, name, runner, args) {

@@ -731,3 +741,3 @@ const sequence = runner.config.sequence.hooks;

async function runTest(test, runner) {
var _a, _b, _c, _d, _e, _f, _g, _h;
var _a, _b, _c, _d, _e, _f;
await ((_a = runner.onBeforeRunTask) == null ? void 0 : _a.call(runner, test));

@@ -805,3 +815,3 @@ if (test.mode !== "run")

try {
await Promise.all(((_f = test.onFinished) == null ? void 0 : _f.map((fn) => fn(test.result))) || []);
await callTaskHooks(test, test.onFinished || [], "stack");
} catch (e) {

@@ -812,3 +822,3 @@ failTask(test.result, e, runner.config.diffOptions);

try {
await Promise.all(((_g = test.onFailed) == null ? void 0 : _g.map((fn) => fn(test.result))) || []);
await callTaskHooks(test, test.onFailed || [], runner.config.sequence.hooks);
} catch (e) {

@@ -830,3 +840,3 @@ failTask(test.result, e, runner.config.diffOptions);

test.result.duration = now() - start;
await ((_h = runner.onAfterRunTask) == null ? void 0 : _h.call(runner, test));
await ((_f = runner.onAfterRunTask) == null ? void 0 : _f.call(runner, test));
updateTask(test, runner);

@@ -833,0 +843,0 @@ }

{
"name": "@vitest/runner",
"type": "module",
"version": "1.5.0",
"version": "1.5.1",
"description": "Vitest test runner",

@@ -43,3 +43,3 @@ "license": "MIT",

"pathe": "^1.1.1",
"@vitest/utils": "1.5.0"
"@vitest/utils": "1.5.1"
},

@@ -46,0 +46,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc