UNPKG

@stryker-mutator/vitest-runner

Version:

A plugin to use the vitest test runner and framework in Stryker, the JavaScript mutation testing framework

16 lines 698 B
// Don't merge this file into 'vitest-helpers.ts'! // This file is used from the testing environment (via stryker-setup.js) and thus could be loaded into the browser (when using vitest with browser mode). // Thus we should avoid unnecessary dependencies in this file. export function collectTestName({ name, suite }) { const nameParts = [name]; let currentSuite = suite; while (currentSuite) { nameParts.unshift(currentSuite.name); currentSuite = currentSuite.suite; } return nameParts.join(' ').trim(); } export function toRawTestId(test) { return `${test.file?.filepath ?? 'unknown.js'}#${collectTestName(test)}`; } //# sourceMappingURL=test-helpers.js.map