From bba2429cadf4f34f3ea54db38ffb19db64549c6d Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Sat, 29 Sep 2018 19:12:26 +0530 Subject: [PATCH] intl: increase coverage for NumberFormat constructor Increase coverage for the Intl.NumberFormat constructor by adding tests checking if appropriate default values are used. --- .../NumberFormat/constructor-default-value.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/intl402/NumberFormat/constructor-default-value.js diff --git a/test/intl402/NumberFormat/constructor-default-value.js b/test/intl402/NumberFormat/constructor-default-value.js new file mode 100644 index 0000000000..00c6081a44 --- /dev/null +++ b/test/intl402/NumberFormat/constructor-default-value.js @@ -0,0 +1,14 @@ +// 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 constructor for Intl.NumberFormat uses appropriate default + values for its arguments (locales and options). +---*/ + +const actual = new Intl.NumberFormat(); +const expected = new Intl.NumberFormat([], { __proto__: null }); + +assert.sameValue(actual.resolvedOptions(), expected.resolvedOptions());