2022-05-20 00:22:26 +00:00
|
|
|
interface Chainer {
|
|
|
|
then(next: Function): this
|
2022-05-20 00:30:41 +00:00
|
|
|
thenWaitFor(n: number | Function): this
|
2022-05-20 00:22:26 +00:00
|
|
|
end(endFn: Function): void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare function waitForUpdate(cb: Function): Chainer
|
|
|
|
|
|
|
|
declare function createTextVNode(arg?: string): any
|
|
|
|
|
|
|
|
declare function triggerEvent(
|
|
|
|
target: Element,
|
|
|
|
event: string,
|
2022-05-20 01:34:55 +00:00
|
|
|
process?: (e: any) => void
|
2022-05-20 00:22:26 +00:00
|
|
|
): void
|
|
|
|
|
|
|
|
// vitest extends jest namespace so we can just extend jest.Matchers
|
|
|
|
declare namespace jest {
|
|
|
|
interface Matchers<R, T> {
|
|
|
|
toHaveBeenWarned(): R
|
|
|
|
toHaveBeenWarnedLast(): R
|
|
|
|
toHaveBeenWarnedTimes(n: number): R
|
2022-05-20 00:46:15 +00:00
|
|
|
toHaveBeenTipped(): R
|
2022-05-20 00:22:26 +00:00
|
|
|
toHaveClass(cls: string): R
|
|
|
|
}
|
|
|
|
}
|
2022-05-23 07:15:29 +00:00
|
|
|
|
|
|
|
declare const jasmine: {
|
|
|
|
createSpy: (id?: string) => {
|
|
|
|
(...args: any[]): any
|
|
|
|
calls: {
|
|
|
|
count(): number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
addMatchers(matchers: any): void
|
|
|
|
}
|