test: fix DevTools target test (#10814)

This commit is contained in:
Alex Rudenko 2023-08-30 13:14:18 +02:00 committed by GitHub
parent c67141f3ae
commit d3b4135b46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,12 +352,10 @@ const serviceWorkerExtensionPath = path.join(
context.newPage(),
]);
const page = await target.page();
expect(
await page?.evaluate(() => {
await page!.waitForFunction(() => {
// @ts-expect-error wrong context.
return Boolean(DevToolsAPI);
})
).toBe(true);
});
await browser.close();
});
});