Skip to content

Commit ec20455

Browse files
authored
fix(expect): don't leak "runner" types (#10004)
1 parent fdff1bf commit ec20455

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/expect/src/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*
77
*/
88

9-
import type { Test } from '@vitest/runner'
109
import type { MockInstance } from '@vitest/spy'
1110
import type { Formatter } from 'tinyrainbow'
1211
import type { AsymmetricMatcher } from './jest-asymmetric-matchers'
@@ -83,7 +82,6 @@ export interface MatcherState {
8382
}
8483
soft?: boolean
8584
poll?: boolean
86-
task?: Readonly<Test>
8785
}
8886

8987
export interface SyncExpectationResult {

packages/vitest/src/types/global.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { ExpectStatic, PromisifyAssertion, Tester } from '@vitest/expect'
22
import type { Plugin as PrettyFormatPlugin } from '@vitest/pretty-format'
3+
import type { Test } from '@vitest/runner'
34
import type { SnapshotState } from '@vitest/snapshot'
45
import type { BenchmarkResult } from '../runtime/types/benchmark'
56
import type { UserConsoleLog } from './general'
@@ -25,6 +26,7 @@ declare module '@vitest/expect' {
2526
interface MatcherState {
2627
environment: string
2728
snapshotState: SnapshotState
29+
task?: Readonly<Test>
2830
}
2931

3032
interface ExpectPollOptions {

0 commit comments

Comments
 (0)