Skip to content

Commit b181b34

Browse files
committed
test: attempt to normalize locale tests
1 parent b96d985 commit b181b34

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/emulation.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
238238
});
239239
it('should format number', async({newPage, server}) => {
240240
{
241-
const page = await newPage();
241+
const page = await newPage({ locale: 'en-US' });
242242
await page.goto(server.EMPTY_PAGE);
243243
expect(await page.evaluate(() => (1000000.50).toLocaleString())).toBe('1,000,000.5');
244244
}
@@ -251,13 +251,13 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
251251
});
252252
it('should format date', async({newPage, server}) => {
253253
{
254-
const page = await newPage();
254+
const page = await newPage({ locale: 'en-US', timezoneId: 'America/Los_Angeles' });
255255
await page.goto(server.EMPTY_PAGE);
256-
const formatted = WIN ? 'Sat Nov 19 2016 10:12:34 GMT-0800 (Pacific Standard Time)' : 'Sat Nov 19 2016 10:12:34 GMT-0800 (PST)';
256+
const formatted = 'Sat Nov 19 2016 10:12:34 GMT-0800 (Pacific Standard Time)';
257257
expect(await page.evaluate(() => new Date(1479579154987).toString())).toBe(formatted);
258258
}
259259
{
260-
const page = await newPage({ locale: 'de-de', timezoneId: 'Europe/Berlin' });
260+
const page = await newPage({ locale: 'de-DE', timezoneId: 'Europe/Berlin' });
261261
await page.goto(server.EMPTY_PAGE);
262262
expect(await page.evaluate(() => new Date(1479579154987).toString())).toBe(
263263
'Sat Nov 19 2016 19:12:34 GMT+0100 (Mitteleuropäische Normalzeit)');

0 commit comments

Comments
 (0)