test-env.d.ts 619 B

1234567891011121314151617181920212223242526
  1. interface Chainer {
  2. then(next: Function): this
  3. thenWaitFor(n: number | Function): this
  4. end(endFn: Function): void
  5. }
  6. declare function waitForUpdate(cb: Function): Chainer
  7. declare function createTextVNode(arg?: string): any
  8. declare function triggerEvent(
  9. target: Element,
  10. event: string,
  11. process?: (e: any) => void
  12. ): void
  13. // vitest extends jest namespace so we can just extend jest.Matchers
  14. declare namespace jest {
  15. interface Matchers<R, T> {
  16. toHaveBeenWarned(): R
  17. toHaveBeenWarnedLast(): R
  18. toHaveBeenWarnedTimes(n: number): R
  19. toHaveBeenTipped(): R
  20. toHaveClass(cls: string): R
  21. }
  22. }