re-add resolve timeout
Some checks failed
Playwright Tests / test (push) Failing after 9s

This commit is contained in:
parent 7d99907277
commit 2b2ac8449f
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -85,13 +85,13 @@ export async function doWithApp<T = unknown>(
export function waitForIndexingComplete(appHandle: JSHandle<App>) {
return appHandle.evaluate(() => {
return new Promise(res2 => {
// let resolved = false;
return new Promise((res2, rej2) => {
let resolved = false;
app.metadataCache.on("resolved", () => {
res2(null);
// resolved = true;
resolved = true;
});
// setTimeout(() => !resolved && rej2("timeout"), 10000);
setTimeout(() => !resolved && rej2("timeout"), 10000);
});
});
}