Socket
Socket
Sign inDemoInstall

@vitest/runner

Package Overview
Dependencies
Maintainers
4
Versions
91
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 2.1.0-beta.6 to 2.1.0-beta.7

dist/tasks--RurNSkd.d.ts

4

dist/index.d.ts
import { VitestRunner } from './types.js';
export { CancelReason, VitestRunnerConfig, VitestRunnerConstructor, VitestRunnerImportSource } from './types.js';
import { T as Task, F as File, d as SuiteAPI, e as TestAPI, f as SuiteCollector, g as CustomAPI, B as BeforeAllListener, A as AfterAllListener, h as BeforeEachListener, i as AfterEachListener, j as TaskHook, O as OnTestFailedHandler, k as OnTestFinishedHandler, a as Test, C as Custom, S as Suite, l as SuiteHooks } from './tasks-C13WjyUB.js';
export { D as DoneCallback, L as ExtendedContext, w as Fixture, v as FixtureFn, u as FixtureOptions, x as Fixtures, y as HookCleanupCallback, H as HookListener, I as InferFixturesTypes, R as RunMode, G as RuntimeContext, M as SequenceHooks, N as SequenceSetupFiles, E as SuiteFactory, n as TaskBase, K as TaskContext, z as TaskCustomOptions, p as TaskMeta, o as TaskPopulated, q as TaskResult, r as TaskResultPack, m as TaskState, J as TestContext, s as TestFunction, t as TestOptions, U as Use } from './tasks-C13WjyUB.js';
import { T as Task, F as File, d as SuiteAPI, e as TestAPI, f as SuiteCollector, g as CustomAPI, B as BeforeAllListener, A as AfterAllListener, h as BeforeEachListener, i as AfterEachListener, j as TaskHook, O as OnTestFailedHandler, k as OnTestFinishedHandler, a as Test, C as Custom, S as Suite, l as SuiteHooks } from './tasks--RurNSkd.js';
export { D as DoneCallback, L as ExtendedContext, w as Fixture, v as FixtureFn, u as FixtureOptions, x as Fixtures, y as HookCleanupCallback, H as HookListener, I as InferFixturesTypes, R as RunMode, G as RuntimeContext, M as SequenceHooks, N as SequenceSetupFiles, E as SuiteFactory, n as TaskBase, K as TaskContext, z as TaskCustomOptions, p as TaskMeta, o as TaskPopulated, q as TaskResult, r as TaskResultPack, m as TaskState, J as TestContext, s as TestFunction, t as TestOptions, U as Use } from './tasks--RurNSkd.js';
import { Awaitable } from '@vitest/utils';

@@ -6,0 +6,0 @@ export { processError } from '@vitest/utils/error';

@@ -59,3 +59,3 @@ import { getSafeTimers, isObject, createDefer, isNegativeNaN, format, objDisplay, objectAttr, toArray, shuffle } from '@vitest/utils';

const { setTimeout, clearTimeout } = getSafeTimers();
return (...args) => {
return function runWithTimeout(...args) {
return Promise.race([

@@ -425,3 +425,3 @@ fn(...args),

withTimeout(
withFixtures(handler, context),
withAwaitAsyncAssetions(withFixtures(handler, context), task2),
(options == null ? void 0 : options.timeout) ?? runner.config.testTimeout

@@ -529,2 +529,14 @@ )

}
function withAwaitAsyncAssetions(fn, task) {
return async (...args) => {
await fn(...args);
if (task.promises) {
const result = await Promise.allSettled(task.promises);
const errors = result.map((r) => r.status === "rejected" ? r.reason : void 0).filter(Boolean);
if (errors.length) {
throw errors;
}
}
};
}
function createSuite() {

@@ -756,3 +768,3 @@ function suiteFn(name, factoryOrOptions, optionsOrFactory = {}) {

const now$1 = Date.now;
const now$1 = globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
async function collectTests(paths, runner) {

@@ -830,3 +842,4 @@ var _a;

const now = Date.now;
const now = globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
const unixNow = Date.now;
function updateSuiteHookState(suite, name, state, runner) {

@@ -941,3 +954,3 @@ var _a;

state: "run",
startTime: start,
startTime: unixNow(),
retryCount: 0

@@ -977,9 +990,2 @@ };

}
if (test.promises) {
const result = await Promise.allSettled(test.promises);
const errors = result.map((r) => r.status === "rejected" ? r.reason : void 0).filter(Boolean);
if (errors.length) {
throw errors;
}
}
await ((_d = runner.onAfterTryTask) == null ? void 0 : _d.call(runner, test, {

@@ -1096,3 +1102,3 @@ retry: retryCount,

state: "run",
startTime: start
startTime: unixNow()
};

@@ -1099,0 +1105,0 @@ updateTask(suite, runner);

@@ -1,3 +0,3 @@

import { M as SequenceHooks, N as SequenceSetupFiles, F as File, T as Task, a as Test, C as Custom, S as Suite, r as TaskResultPack, K as TaskContext, L as ExtendedContext } from './tasks-C13WjyUB.js';
export { A as AfterAllListener, i as AfterEachListener, B as BeforeAllListener, h as BeforeEachListener, g as CustomAPI, D as DoneCallback, w as Fixture, v as FixtureFn, u as FixtureOptions, x as Fixtures, y as HookCleanupCallback, H as HookListener, I as InferFixturesTypes, O as OnTestFailedHandler, k as OnTestFinishedHandler, R as RunMode, G as RuntimeContext, d as SuiteAPI, f as SuiteCollector, E as SuiteFactory, l as SuiteHooks, n as TaskBase, z as TaskCustomOptions, j as TaskHook, p as TaskMeta, o as TaskPopulated, q as TaskResult, m as TaskState, e as TestAPI, J as TestContext, s as TestFunction, t as TestOptions, U as Use } from './tasks-C13WjyUB.js';
import { M as SequenceHooks, N as SequenceSetupFiles, F as File, T as Task, a as Test, C as Custom, S as Suite, r as TaskResultPack, K as TaskContext, L as ExtendedContext } from './tasks--RurNSkd.js';
export { A as AfterAllListener, i as AfterEachListener, B as BeforeAllListener, h as BeforeEachListener, g as CustomAPI, D as DoneCallback, w as Fixture, v as FixtureFn, u as FixtureOptions, x as Fixtures, y as HookCleanupCallback, H as HookListener, I as InferFixturesTypes, O as OnTestFailedHandler, k as OnTestFinishedHandler, R as RunMode, G as RuntimeContext, d as SuiteAPI, f as SuiteCollector, E as SuiteFactory, l as SuiteHooks, n as TaskBase, z as TaskCustomOptions, j as TaskHook, p as TaskMeta, o as TaskPopulated, q as TaskResult, m as TaskState, e as TestAPI, J as TestContext, s as TestFunction, t as TestOptions, U as Use } from './tasks--RurNSkd.js';
import { DiffOptions } from '@vitest/utils/diff';

@@ -4,0 +4,0 @@ import '@vitest/utils';

@@ -1,3 +0,3 @@

import { S as Suite, F as File, T as Task, a as Test, C as Custom } from './tasks-C13WjyUB.js';
export { b as ChainableFunction, c as createChainable } from './tasks-C13WjyUB.js';
import { S as Suite, F as File, T as Task, a as Test, C as Custom } from './tasks--RurNSkd.js';
export { b as ChainableFunction, c as createChainable } from './tasks--RurNSkd.js';
import { Arrayable } from '@vitest/utils';

@@ -4,0 +4,0 @@

{
"name": "@vitest/runner",
"type": "module",
"version": "2.1.0-beta.6",
"version": "2.1.0-beta.7",
"description": "Vitest test runner",

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

"pathe": "^1.1.2",
"@vitest/utils": "2.1.0-beta.6"
"@vitest/utils": "2.1.0-beta.7"
},

@@ -45,0 +45,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