diff --git a/tests/page/page-evaluate.spec.ts b/tests/page/page-evaluate.spec.ts index 07e8f6b084..9e7ea8695a 100644 --- a/tests/page/page-evaluate.spec.ts +++ b/tests/page/page-evaluate.spec.ts @@ -135,6 +135,19 @@ it('should work with unicode chars', async ({ page }) => { expect(result).toBe(42); }); +it('should work with large strings', async ({ page }) => { + const expected = 'x'.repeat(40000); + expect(await page.evaluate(data => data, expected)).toBe(expected); +}); + +it('should work with large unicode strings', async ({ page, browserName, platform }) => { + it.fail(browserName === 'firefox' && platform !== 'linux'); + it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/16367' }); + + const expected = '🎭'.repeat(10000); + expect(await page.evaluate(data => data, expected)).toBe(expected); +}); + it('should throw when evaluation triggers reload', async ({ page }) => { let error = null; await page.evaluate(() => {