(
const update = updateWithAct(renderer, wrap);
const instance = renderer.root;
+ addToCleanupQueue(renderer.unmount);
+
return {
...getByAPI(instance),
...queryByAPI(instance),
diff --git a/typings/index.d.ts b/typings/index.d.ts
index 66374d7d7..d9d83c4b4 100644
--- a/typings/index.d.ts
+++ b/typings/index.d.ts
@@ -135,6 +135,7 @@ export declare const shallow: (
instance: ReactTestInstance | React.ReactElement
) => { output: React.ReactElement
};
export declare const flushMicrotasksQueue: () => Promise;
+export declare const cleanup: () => void;
export declare const debug: DebugAPI;
export declare const fireEvent: FireEventAPI;
export declare const waitForElement: WaitForElementFunction;