mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +00:00
14 lines
370 B
TypeScript
14 lines
370 B
TypeScript
import type { TestContext } from 'vitest'
|
|
import { TestRunner } from 'vitest'
|
|
import { getSuiteNames } from './utils';
|
|
|
|
class CustomTestRunner extends TestRunner {
|
|
extendTaskContext(context: TestContext) {
|
|
super.extendTaskContext(context);
|
|
(context as any).__suiteNames = getSuiteNames(context.task.suite)
|
|
return context
|
|
}
|
|
}
|
|
|
|
export default CustomTestRunner
|