- Notifications
You must be signed in to change notification settings - Fork 33.7k
/
Copy pathtest-env.d.ts
36 lines (31 loc) · 785 Bytes
/
test-env.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
interfaceChainer{
then(next: Function): this
thenWaitFor(n: number|Function): this
end(endFn: Function): void
}
declarefunctionwaitForUpdate(cb: Function): Chainer
declarefunctioncreateTextVNode(arg?: string): any
declarefunctiontriggerEvent(
target: Element,
event: string,
process?: (e: any)=>void
): void
// vitest extends jest namespace so we can just extend jest.Matchers
declarenamespacejest{
interfaceMatchers<R,T>{
toHaveBeenWarned(): R
toHaveBeenWarnedLast(): R
toHaveBeenWarnedTimes(n: number): R
toHaveBeenTipped(): R
toHaveClass(cls: string): R
}
}
declareconstjasmine: {
createSpy: (id?: string)=>{
(...args: any[]): any
calls: {
count(): number
}
}
addMatchers(matchers: any): void
}