- 
                Notifications
    
You must be signed in to change notification settings  - Fork 11
 
Open
Description
I have extended test from playwright-test-coverage to define a browser fixture. But I run into an error:
    Error: page.evaluate: TypeError: callbacks.set is not a function
    
        at <anonymous>:24:64
        at new Promise (<anonymous>)
        at globalThis.<computed> (<anonymous>:24:21)
        at eval (eval at evaluate (:234:30), <anonymous>:2:16)
        at UtilityScript.evaluate (<anonymous>:236:17)
        at UtilityScript.<anonymous> (<anonymous>:1:44)
I found that it can be avoided by just adding a closure to the callback function of page.evaluate:
await page.evaluate(() => {
    window.collectIstanbulCoverage(JSON.stringify(window.__coverage__));
});
Metadata
Metadata
Assignees
Labels
No labels