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

@vitest/runner

Package Overview
Dependencies
Maintainers
3
Versions
94
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.1.0 to 1.1.1

47

dist/index.js

@@ -142,26 +142,3 @@ import limit from 'p-limit';

continue;
let resolvedValue;
if (fixture.isFn) {
const useFnArgPromise = createDefer();
let isUseFnArgResolved = false;
const fixtureReturn = fixture.value(context, async (useFnArg) => {
isUseFnArgResolved = true;
useFnArgPromise.resolve(useFnArg);
const useReturnPromise = createDefer();
cleanupFnArray.push(async () => {
useReturnPromise.resolve();
await fixtureReturn;
});
await useReturnPromise;
}).catch((e) => {
if (!isUseFnArgResolved) {
useFnArgPromise.reject(e);
return;
}
throw e;
});
resolvedValue = await useFnArgPromise;
} else {
resolvedValue = fixture.value;
}
const resolvedValue = fixture.isFn ? await resolveFixtureFunction(fixture.value, context, cleanupFnArray) : fixture.value;
context[fixture.prop] = resolvedValue;

@@ -177,2 +154,23 @@ fixtureValueMap.set(fixture, resolvedValue);

}
async function resolveFixtureFunction(fixtureFn, context, cleanupFnArray2) {
const useFnArgPromise = createDefer();
let isUseFnArgResolved = false;
const fixtureReturn = fixtureFn(context, async (useFnArg) => {
isUseFnArgResolved = true;
useFnArgPromise.resolve(useFnArg);
const useReturnPromise = createDefer();
cleanupFnArray2.push(async () => {
useReturnPromise.resolve();
await fixtureReturn;
});
await useReturnPromise;
}).catch((e) => {
if (!isUseFnArgResolved) {
useFnArgPromise.reject(e);
return;
}
throw e;
});
return useFnArgPromise;
}
function resolveDeps(fixtures, depSet = /* @__PURE__ */ new Set(), pendingFixtures = []) {

@@ -697,2 +695,3 @@ fixtures.forEach((fixture) => {

updateTask(test, runner);
setCurrentTest(void 0);
return;

@@ -699,0 +698,0 @@ }

{
"name": "@vitest/runner",
"type": "module",
"version": "1.1.0",
"version": "1.1.1",
"description": "Vitest test runner",

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

"pathe": "^1.1.1",
"@vitest/utils": "1.1.0"
"@vitest/utils": "1.1.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