Try altering cancelIdleCallback stub to see if that makes test deterministic

Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
This commit is contained in:
Janne Savolainen authored and Janne Savolainen committed 2021-12-04 12:20:20 +02:00
1 parent 4c775256bb
commit e793859d82
1 file changed
+5 -1
@@ -50,7 +50,11 @@ describe("kube-object-menu", () => {
return undefined; return undefined;
}; };
window.cancelIdleCallback = () => {}; window.cancelIdleCallback = cancelIdleCallback => {
if (typeof cancelIdleCallback === "function") {
cancelIdleCallback();
}
};
apiManagerStub = { apiManagerStub = {
getStore: <TKubeObjectStore extends KubeObjectStore<KubeObject>>( getStore: <TKubeObjectStore extends KubeObjectStore<KubeObject>>(