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.0.5 to 2.1.0-beta.1

dist/tasks-C13WjyUB.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-zB5uPauP.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-zB5uPauP.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 { Awaitable } from '@vitest/utils';

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

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

let currentTestFilepath;
function assert(condition, message) {
if (!condition) {
throw new Error(`Vitest failed to find ${message}. This is a bug in Vitest. Please, open an issue with reproduction.`);
}
}
function getDefaultSuite() {
assert(defaultSuite, "the default suite");
return defaultSuite;

@@ -318,2 +324,3 @@ }

function getRunner() {
assert(runner, "the runner");
return runner;

@@ -338,3 +345,5 @@ }

function getCurrentSuite() {
return collectorContext.currentSuite || defaultSuite;
const currentSuite = collectorContext.currentSuite || defaultSuite;
assert(currentSuite, "the current suite");
return currentSuite;
}

@@ -524,3 +533,3 @@ function createSuiteHooks() {

const mode = this.only ? "only" : this.skip ? "skip" : this.todo ? "todo" : "run";
const currentSuite = getCurrentSuite();
const currentSuite = collectorContext.currentSuite || defaultSuite;
let { options, handler: factory } = parseArguments(

@@ -527,0 +536,0 @@ factoryOrOptions,

@@ -1,6 +0,9 @@

import { M as SequenceHooks, N as SequenceSetupFiles, F as File, T as Task, S as Suite, r as TaskResultPack, a as Test, C as Custom, K as TaskContext, L as ExtendedContext } from './tasks-zB5uPauP.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-zB5uPauP.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-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 { DiffOptions } from '@vitest/utils/diff';
import '@vitest/utils';
/**
* This is a subset of Vitest config that's required for the runner to work.
*/
interface VitestRunnerConfig {

@@ -68,3 +71,3 @@ root: string;

*/
onTaskFinished?: (test: Task) => unknown;
onTaskFinished?: (test: Test | Custom) => unknown;
/**

@@ -112,3 +115,3 @@ * Called after result and state are set.

/**
* Called when new context for a test is defined. Useful, if you want to add custom properties to the context.
* Called when new context for a test is defined. Useful if you want to add custom properties to the context.
* If you only want to define custom context, consider using "beforeAll" in "setupFiles" instead.

@@ -122,3 +125,3 @@ *

/**
* Called, when files are imported. Can be called in two situations: when collecting tests and when importing setup files.
* Called when test and setup files are imported. Can be called in two situations: when collecting tests and when importing setup files.
*/

@@ -125,0 +128,0 @@ importFile: (filepath: string, source: VitestRunnerImportSource) => unknown;

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

import { S as Suite, F as File, T as Task, a as Test, C as Custom } from './tasks-zB5uPauP.js';
export { b as ChainableFunction, c as createChainable } from './tasks-zB5uPauP.js';
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 { Arrayable } from '@vitest/utils';

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

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

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

"pathe": "^1.1.2",
"@vitest/utils": "2.0.5"
"@vitest/utils": "2.1.0-beta.1"
},

@@ -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