Skip to content

Commit

Permalink
test: fix locale tests on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov committed Feb 14, 2020
1 parent b181b34 commit 7ec3bf4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/emulation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
});
});

describe.skip(CHROMIUM || FFOX)('BrowserContext({language})', function() {
describe.skip(CHROMIUM || FFOX)('BrowserContext({locale})', function() {
it('should affect accept-language header', async({newPage, server}) => {
const page = await newPage({ locale: 'fr-CH' });
const [request] = await Promise.all([
Expand All @@ -245,8 +245,7 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
{
const page = await newPage({ locale: 'fr-CH' });
await page.goto(server.EMPTY_PAGE);
const formatted = MAC ? '1\u00A0000\u00A0000,5' : '1\u202F000\u202F000,5';
expect(await page.evaluate(() => (1000000.50).toLocaleString())).toBe(formatted);
expect(await page.evaluate(() => (1000000.50).toLocaleString().replace(/\s/g, ' '))).toBe('1 000 000,5');
}
});
it('should format date', async({newPage, server}) => {
Expand Down

0 comments on commit 7ec3bf4

Please sign in to comment.