update puppeteer to use setContent with wait and housekeeping the declaration files

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 270c9e48aa
commit 9a4640fa98
4 changed files with 6 additions and 44 deletions

View File

@@ -214,7 +214,12 @@ describe('record integration tests', () => {
it('can record node mutations', async () => {
const page: puppeteer.Page = await this.browser.newPage();
await page.goto(`data:text/html,${getHtml.call(this, 'select2.html')}`, {
await page.goto('about:blank');
// FIXME: use setContent directly when @types/puppeteer update
const setContent = async (html: string, options: any) => {
return page.setContent.call(page, html, options);
};
await setContent(getHtml.call(this, 'select2.html'), {
waitUntil: 'networkidle0',
});