Merge pull request #374 from Hywan/js_test_date_locale

test(js) Fix expectations regarding given locales
This commit is contained in:
Sendil Kumar N 2018-07-04 22:25:05 +02:00 committed by GitHub
commit e912b9d2a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,7 +256,9 @@ fn to_locale_date_string() {
let date = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
let options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
assert.equal(wasm.to_locale_date_string(date, 'de-DE', options), 'Thursday, December 20, 2012');
let output = wasm.to_locale_date_string(date, 'de-DE', options)
assert.equal(typeof output, 'string');
assert.ok(output.length > 0);
}
"#)
.test()
@ -284,7 +286,9 @@ fn to_locale_string() {
export function test() {
let date = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
assert.equal(wasm.to_locale_string(date, 'en-GB', { timeZone: 'UTC' }), "12/20/2012, 3:00:00 AM");
let output = wasm.to_locale_string(date, 'en-GB', { timeZone: 'UTC' });
assert.equal(typeof output, 'string');
assert.ok(output.length > 0);
}
"#)
.test()