Skip to content

Commit

Permalink
test: fix 'exposeFunction should not leak' in video mode (#28169)
Browse files Browse the repository at this point in the history
This is like how we do it with the other channel tests. In video mode we
produce artifacts so we need to add them to our expectation.
  • Loading branch information
mxschmitt authored Nov 15, 2023
1 parent 0867c3c commit 7ffcb42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/library/channels.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ it('should work with the domain module', async ({ browserType, server, browserNa
throw err;
});

it('exposeFunction should not leak', async ({ page, expectScopeState, server }) => {
it('exposeFunction should not leak', async ({ page, expectScopeState, server, video }) => {
await page.goto(server.EMPTY_PAGE);
let called = 0;
await page.exposeFunction('myFunction', () => ++called);
Expand Down Expand Up @@ -284,6 +284,7 @@ it('exposeFunction should not leak', async ({ page, expectScopeState, server })
{
'_guid': 'browser',
'objects': [
...(video === 'on' ? [{ _guid: 'artifact', objects: [] }] : []),
{
'_guid': 'browser-context',
'objects': [
Expand Down

0 comments on commit 7ffcb42

Please sign in to comment.