mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 22:15:24 +02:00
intl: increase coverage from the NumberFormat constructor
Improve coverage for the Intl.NumberFormat constructor by testing that it accepts Array-like objects and handles them properly.
This commit is contained in:
parent
cd55e30938
commit
de416c28c3
17
test/intl402/NumberFormat/constructor-locales-arraylike.js
Normal file
17
test/intl402/NumberFormat/constructor-locales-arraylike.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (C) 2018 Ujjwal Sharma. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-initializenumberformat
|
||||||
|
description: >
|
||||||
|
Tests that the Intl.NumberFormat constructor accepts Array-like values for the
|
||||||
|
locales argument and treats them well.
|
||||||
|
---*/
|
||||||
|
|
||||||
|
const actual = Intl.NumberFormat({
|
||||||
|
length: 1,
|
||||||
|
1: 'en-US'
|
||||||
|
});
|
||||||
|
const expected = Intl.NumberFormat(['en-US']);
|
||||||
|
|
||||||
|
assert.sameValue(actual.resolvedOptions(), expected.resolvedOptions());
|
Loading…
x
Reference in New Issue
Block a user