Skip to content

Commit 297e261

Browse files
committed
test: migrate deprecated getCurrentTest
1 parent f7c74c0 commit 297e261

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎test/test-utils/index.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import process from 'node:process'
44
import { fileURLToPath } from 'node:url'
55
import { dirname, resolve } from 'pathe'
66
import { x } from 'tinyexec'
7-
import { afterEach, onTestFinished } from 'vitest'
8-
import { getCurrentTest } from 'vitest/suite'
7+
import { afterEach, onTestFinished, TestRunner } from 'vitest'
98
import { Cli } from './cli'
109

1110
interface CliOptions extends Partial<Options> {
@@ -21,7 +20,7 @@ async function runCli(command: string, _options?: CliOptions | string, ...args:
2120
options = undefined
2221
}
2322

24-
const signal = getCurrentTest()?.context.signal
23+
const signal = TestRunner.getCurrentTest()?.context.signal
2524
const subprocess = x(command, args, { ...options as Options, signal }).process!
2625
const cli = new Cli({
2726
stdin: subprocess.stdin!,

0 commit comments

Comments
 (0)