This commit is contained in:
parent
7d99907277
commit
2b2ac8449f
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user