@@ -238,7 +238,7 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
238
238
} ) ;
239
239
it ( 'should format number' , async ( { newPage, server} ) => {
240
240
{
241
- const page = await newPage ( ) ;
241
+ const page = await newPage ( { locale : 'en-US' } ) ;
242
242
await page . goto ( server . EMPTY_PAGE ) ;
243
243
expect ( await page . evaluate ( ( ) => ( 1000000.50 ) . toLocaleString ( ) ) ) . toBe ( '1,000,000.5' ) ;
244
244
}
@@ -251,13 +251,13 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
251
251
} ) ;
252
252
it ( 'should format date' , async ( { newPage, server} ) => {
253
253
{
254
- const page = await newPage ( ) ;
254
+ const page = await newPage ( { locale : 'en-US' , timezoneId : 'America/Los_Angeles' } ) ;
255
255
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)' ;
257
257
expect ( await page . evaluate ( ( ) => new Date ( 1479579154987 ) . toString ( ) ) ) . toBe ( formatted ) ;
258
258
}
259
259
{
260
- const page = await newPage ( { locale : 'de-de ' , timezoneId : 'Europe/Berlin' } ) ;
260
+ const page = await newPage ( { locale : 'de-DE ' , timezoneId : 'Europe/Berlin' } ) ;
261
261
await page . goto ( server . EMPTY_PAGE ) ;
262
262
expect ( await page . evaluate ( ( ) => new Date ( 1479579154987 ) . toString ( ) ) ) . toBe (
263
263
'Sat Nov 19 2016 19:12:34 GMT+0100 (Mitteleuropäische Normalzeit)' ) ;
0 commit comments