We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 718aaae commit ea48684Copy full SHA for ea48684
src/render-async.tsx
@@ -117,3 +117,15 @@ function updateWithAsyncAct(
117
}
118
119
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