@@ -3,12 +3,16 @@ import { WaitForRenderTimeoutError } from "../internal/index.js";
3
3
import type {
4
4
NextRenderOptions ,
5
5
Profiler ,
6
+ ProfiledComponent ,
6
7
ProfiledHook ,
7
8
} from "../internal/index.js" ;
8
9
9
10
export const toRerender : MatcherFunction < [ options ?: NextRenderOptions ] > =
10
11
async function ( actual , options ) {
11
- const _profiler = actual as Profiler < any > | ProfiledHook < any , any > ;
12
+ const _profiler = actual as
13
+ | Profiler < any >
14
+ | ProfiledComponent < any , any >
15
+ | ProfiledHook < any , any > ;
12
16
const profiler = "Profiler" in _profiler ? _profiler . Profiler : _profiler ;
13
17
const hint = this . utils . matcherHint ( "toRerender" , "ProfiledComponent" , "" ) ;
14
18
let pass = true ;
@@ -40,7 +44,10 @@ const failed = {};
40
44
export const toRenderExactlyTimes : MatcherFunction <
41
45
[ times : number , options ?: NextRenderOptions ]
42
46
> = async function ( actual , times , optionsPerRender ) {
43
- const _profiler = actual as Profiler < any > | ProfiledHook < any , any > ;
47
+ const _profiler = actual as
48
+ | Profiler < any >
49
+ | ProfiledComponent < any , any >
50
+ | ProfiledHook < any , any > ;
44
51
const profiler = "Profiler" in _profiler ? _profiler . Profiler : _profiler ;
45
52
const options = { timeout : 100 , ...optionsPerRender } ;
46
53
const hint = this . utils . matcherHint ( "toRenderExactlyTimes" ) ;
0 commit comments