@@ -23,6 +23,7 @@ import {
2323 currentURL ,
2424 // Rendering Helpers
2525 render ,
26+ rerender ,
2627 clearRender ,
2728 // Wait Helpers
2829 waitFor ,
@@ -45,6 +46,11 @@ import {
4546 unsetContext ,
4647 teardownContext ,
4748 setupRenderingContext ,
49+ BaseContext ,
50+ TestContext ,
51+ RenderingTestContext ,
52+ TestMetadata ,
53+ DebugInfo as InternalDebugInfo ,
4854 getApplication ,
4955 setApplication ,
5056 setupApplicationContext ,
@@ -57,10 +63,6 @@ import {
5763 getDeprecationsDuringCallback ,
5864 getWarnings ,
5965 getWarningsDuringCallback ,
60- BaseContext ,
61- TestContext ,
62- TestMetadata ,
63- DebugInfo as InternalDebugInfo ,
6466 DeprecationFailure ,
6567 Warning ,
6668} from '@ember/test-helpers' ;
@@ -99,7 +101,11 @@ expectTypeOf(tap).toEqualTypeOf<
99101 ( target : Target , options ?: TouchEventInit ) => Promise < void >
100102> ( ) ;
101103expectTypeOf ( triggerEvent ) . toEqualTypeOf <
102- ( target : Target , eventType : string , options ?: object ) => Promise < void >
104+ (
105+ target : Target ,
106+ eventType : string ,
107+ options ?: Record < string , unknown >
108+ ) => Promise < void >
103109> ( ) ;
104110expectTypeOf ( triggerKeyEvent ) . toEqualTypeOf <
105111 (
@@ -125,8 +131,14 @@ expectTypeOf(typeIn).toEqualTypeOf<
125131> ( ) ;
126132
127133// DOM Query Helpers
128- expectTypeOf ( find ) . toEqualTypeOf < ( selector : string ) => Element | null > ( ) ;
134+ expectTypeOf ( find ) . toEqualTypeOf < Document [ 'querySelector' ] > ( ) ;
135+ expectTypeOf ( find ( 'a' ) ) . toEqualTypeOf < HTMLAnchorElement | null > ( ) ;
136+ expectTypeOf ( find ( 'circle' ) ) . toEqualTypeOf < SVGCircleElement | null > ( ) ;
137+ expectTypeOf ( find ( '.corkscrew' ) ) . toEqualTypeOf < Element | null > ( ) ;
129138expectTypeOf ( findAll ) . toEqualTypeOf < ( selector : string ) => Array < Element > > ( ) ;
139+ expectTypeOf ( findAll ( 'a' ) ) . toEqualTypeOf < HTMLAnchorElement [ ] > ( ) ;
140+ expectTypeOf ( findAll ( 'circle' ) ) . toEqualTypeOf < SVGCircleElement [ ] > ( ) ;
141+ expectTypeOf ( findAll ( '.corkscrew' ) ) . toEqualTypeOf < Element [ ] > ( ) ;
130142expectTypeOf ( getRootElement ) . toEqualTypeOf < ( ) => Element | Document > ( ) ;
131143
132144// Routing Helpers
@@ -143,6 +155,7 @@ expectTypeOf(render).toMatchTypeOf<
143155 options ?: { owner ?: Owner }
144156 ) => Promise < void >
145157> ( ) ;
158+ expectTypeOf ( rerender ) . toMatchTypeOf < ( ) => Promise < void > > ( ) ;
146159expectTypeOf ( clearRender ) . toEqualTypeOf < ( ) => Promise < void > > ( ) ;
147160
148161// Wait Helpers
@@ -176,7 +189,7 @@ expectTypeOf(getSettledState).toEqualTypeOf<
176189 hasPendingTransitions : boolean | null ;
177190 isRenderPending : boolean ;
178191 pendingRequestCount : number ;
179- debugInfo ? : InternalDebugInfo ;
192+ debugInfo : InternalDebugInfo ;
180193 }
181194> ( ) ;
182195
@@ -209,7 +222,7 @@ expectTypeOf(teardownContext).toEqualTypeOf<
209222 ) => Promise < void >
210223> ( ) ;
211224expectTypeOf ( setupRenderingContext ) . toEqualTypeOf <
212- ( context : TestContext ) => Promise < void >
225+ ( context : TestContext ) => Promise < RenderingTestContext >
213226> ( ) ;
214227expectTypeOf ( getApplication ) . toEqualTypeOf < ( ) => Application | undefined > ( ) ;
215228expectTypeOf ( setApplication ) . toEqualTypeOf <
0 commit comments