File tree Expand file tree Collapse file tree 3 files changed +28
-28
lines changed Expand file tree Collapse file tree 3 files changed +28
-28
lines changed Original file line number Diff line number Diff line change 1
1
node_modules /
2
+ dist /
2
3
.yarn /*
3
4
! .yarn /patches
4
5
! .yarn /plugins
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import { expect } from "@jest/globals" ;
2
2
import { toRerender , toRenderExactlyTimes } from "./ProfiledComponent.js" ;
3
+ import type {
4
+ NextRenderOptions ,
5
+ Profiler ,
6
+ ProfiledComponent ,
7
+ ProfiledHook ,
8
+ } from "../profile/index.js" ;
3
9
4
10
expect . extend ( {
5
11
toRerender,
6
12
toRenderExactlyTimes,
7
13
} ) ;
14
+ interface ApolloCustomMatchers < R = void , T = { } > {
15
+ toRerender : T extends
16
+ | Profiler < any >
17
+ | ProfiledComponent < any , any >
18
+ | ProfiledHook < any , any >
19
+ ? ( options ?: NextRenderOptions ) => Promise < R >
20
+ : { error : "matcher needs to be called on a ProfiledComponent instance" } ;
21
+
22
+ toRenderExactlyTimes : T extends
23
+ | Profiler < any >
24
+ | ProfiledComponent < any , any >
25
+ | ProfiledHook < any , any >
26
+ ? ( count : number , options ?: NextRenderOptions ) => Promise < R >
27
+ : { error : "matcher needs to be called on a ProfiledComponent instance" } ;
28
+ }
29
+
30
+ declare global {
31
+ namespace jest {
32
+ interface Matchers < R = void , T = { } > extends ApolloCustomMatchers < R , T > { }
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments