Skip to content

Commit 7ffcb42

Browse files
authored
test: fix 'exposeFunction should not leak' in video mode (#28169)
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.
1 parent 0867c3c commit 7ffcb42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/library/channels.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ it('should work with the domain module', async ({ browserType, server, browserNa
256256
throw err;
257257
});
258258

259-
it('exposeFunction should not leak', async ({ page, expectScopeState, server }) => {
259+
it('exposeFunction should not leak', async ({ page, expectScopeState, server, video }) => {
260260
await page.goto(server.EMPTY_PAGE);
261261
let called = 0;
262262
await page.exposeFunction('myFunction', () => ++called);
@@ -284,6 +284,7 @@ it('exposeFunction should not leak', async ({ page, expectScopeState, server })
284284
{
285285
'_guid': 'browser',
286286
'objects': [
287+
...(video === 'on' ? [{ _guid: 'artifact', objects: [] }] : []),
287288
{
288289
'_guid': 'browser-context',
289290
'objects': [

0 commit comments

Comments
 (0)