diff --git a/tests/stress/heap.spec.ts b/tests/stress/heap.spec.ts index a88ab29005..66bedfe9ff 100644 --- a/tests/stress/heap.spec.ts +++ b/tests/stress/heap.spec.ts @@ -44,9 +44,9 @@ test('should not leak fixtures w/o page', async ({}) => { test('should not leak server-side objects', async ({ page }) => { expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/page').Page)).toBe(1); - // 4 is because v8 heap creates objects for descendant classes, so WKContext, CRContext, FFContext and our context instance. - expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browserContext').BrowserContext)).toBe(4); - expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browser').Browser)).toBe(4); + // 4 is because v8 heap creates objects for descendant classes, so WKContext, CRContext, FFContext, BidiBrowserContext and our context instance. + expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browserContext').BrowserContext)).toBe(5); + expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browser').Browser)).toBe(5); }); test('should not leak dispatchers after closing page', async ({ context, server }) => {