File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11node_modules /
2+ dist /
23.yarn /*
34! .yarn /patches
45! .yarn /plugins
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import { expect } from "@jest/globals" ;
22import { toRerender , toRenderExactlyTimes } from "./ProfiledComponent.js" ;
3+ import type {
4+ NextRenderOptions ,
5+ Profiler ,
6+ ProfiledComponent ,
7+ ProfiledHook ,
8+ } from "../profile/index.js" ;
39
410expect . extend ( {
511 toRerender,
612 toRenderExactlyTimes,
713} ) ;
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