Skip to content

Commit

Permalink
test: Intl.ListFormat is working in playwright all browsers (#28178)
Browse files Browse the repository at this point in the history
Fixes #23978
  • Loading branch information
yury-s authored Nov 16, 2023
1 parent aec4399 commit 85438ed
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/library/capabilities.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,17 @@ it('should send no Content-Length header for GET requests with a Content-Type',
]);
expect(request.headers['content-length']).toBe(undefined);
});

it('Intl.ListFormat should work', async ({ page, server }) => {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/23978' });
await page.goto(server.EMPTY_PAGE);
const formatted = await page.evaluate(() => {
const data = ['first', 'second', 'third'];
const listFormat = new Intl.ListFormat('en', {
type: 'disjunction',
style: 'short',
});
return listFormat.format(data);
});
expect(formatted).toBe('first, second, or third');
});

0 comments on commit 85438ed

Please sign in to comment.