chore: add a test for builtins (#35754)

This commit is contained in:
Dmitry Gozman 2025-04-28 07:36:53 +00:00 committed by GitHub
parent fe258e6568
commit a4b5c1c461
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,3 +83,15 @@ it('should work with bogus Array.from', async ({ page, server }) => {
const divsCount = await page.$$eval('css=div', divs => divs.length);
expect(divsCount).toBe(3);
});
it.fixme('should work with broken Map', async ({ page, server }) => {
await page.setContent(`
<script>
window.Map = () => {};
</script>
<button>Click me</button>
<button>And me</button>
`);
const count = await page.$$eval('role=button', els => els.length);
expect(count).toBe(2);
});