File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,8 @@ const findAllBy: Promise<ReactTestInstance[]>[] = [
199
199
// debug API
200
200
const debugFn = tree . debug ( ) ;
201
201
const debugFnWithMessage = tree . debug ( 'my message' ) ;
202
+ const shallowDebug = tree . debug . shallow ( ) ;
203
+ const shallowDebugWithMessage = tree . debug . shallow ( 'my message' ) ;
202
204
203
205
// update API
204
206
tree . update ( < View /> ) ;
Original file line number Diff line number Diff line change @@ -137,7 +137,10 @@ interface FindByAPI {
137
137
value : string | RegExp ,
138
138
waitForOptions ?: WaitForOptions
139
139
) => FindReturn ;
140
- findByTestId : ( testID : string | RegExp , waitForOptions ?: WaitForOptions ) => FindReturn ;
140
+ findByTestId : (
141
+ testID : string | RegExp ,
142
+ waitForOptions ?: WaitForOptions
143
+ ) => FindReturn ;
141
144
findAllByText : (
142
145
text : string | RegExp ,
143
146
waitForOptions ?: WaitForOptions
@@ -295,14 +298,19 @@ export interface RenderOptions {
295
298
createNodeMock ?: ( element : React . ReactElement < any > ) => any ;
296
299
}
297
300
301
+ type Debug = {
302
+ ( message ?: string ) ;
303
+ shallow : ( message ?: string ) => void ;
304
+ } ;
305
+
298
306
type Queries = GetByAPI & QueryByAPI & FindByAPI & A11yAPI ;
299
307
300
308
export interface RenderAPI extends Queries {
301
309
update ( nextElement : React . ReactElement < any > ) : void ;
302
310
rerender ( nextElement : React . ReactElement < any > ) : void ;
303
311
unmount ( nextElement ?: React . ReactElement < any > ) : void ;
304
312
toJSON ( ) : ReactTestRendererJSON | null ;
305
- debug ( message ?: string ) : void ;
313
+ debug : Debug ;
306
314
container : ReactTestInstance ;
307
315
}
308
316
You can’t perform that action at this time.
0 commit comments