Skip to content

Commit ea48684

Browse files
committed
.
1 parent 718aaae commit ea48684

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/render-async.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,15 @@ function updateWithAsyncAct(
117117
}
118118

119119
export type DebugFunction = (options?: DebugOptions) => void;
120+
121+
function makeDebug(renderer: ReactTestRenderer): DebugFunction {
122+
function debugImpl(options?: DebugOptions) {
123+
const { defaultDebugOptions } = getConfig();
124+
const debugOptions = { ...defaultDebugOptions, ...options };
125+
const json = renderer.toJSON();
126+
if (json) {
127+
return debug(json, debugOptions);
128+
}
129+
}
130+
return debugImpl;
131+
}

0 commit comments

Comments
 (0)