diff --git a/test/intl402/Locale/constructor-options-numeric-undefined.js b/test/intl402/Locale/constructor-options-numeric-undefined.js index e125b53302145423e96810c6830b0fa88f06064d..fa4251655ca87c51076ee1a69c53493371081130 100644 --- a/test/intl402/Locale/constructor-options-numeric-undefined.js +++ b/test/intl402/Locale/constructor-options-numeric-undefined.js @@ -45,9 +45,7 @@ assert.sameValue( "en-u-kn-true", ); -if ("numeric" in Intl.Locale.prototype) { - assert.sameValue( - new Intl.Locale('en-u-kf-lower', options).numeric, - undefined, - ); -} +assert.sameValue( + new Intl.Locale('en-u-kf-lower', options).numeric, + undefined, +); diff --git a/test/intl402/Locale/constructor-options-numeric-valid.js b/test/intl402/Locale/constructor-options-numeric-valid.js index a9544668131c62a22de5a075ca7355b888dfb89e..ce3d1da15a7af8caaaf74a51dd51ac1dc2ceda7e 100644 --- a/test/intl402/Locale/constructor-options-numeric-valid.js +++ b/test/intl402/Locale/constructor-options-numeric-valid.js @@ -46,21 +46,21 @@ const validNumericOptions = [ [{ valueOf() { return false; } }, true], ]; for (const [numeric, expected] of validNumericOptions) { - const options = { numeric }; + let options = { numeric }; + let expect = `en-u-kn-${expected}`; + assert.sameValue( new Intl.Locale('en', options).toString(), - "en-u-kn-" + expected + expect ); assert.sameValue( new Intl.Locale('en-u-kn-true', options).toString(), - "en-u-kn-" + expected + expect ); - if ("numeric" in Intl.Locale.prototype) { - assert.sameValue( - new Intl.Locale('en-u-kf-lower', options).numeric, - expected - ); - } + assert.sameValue( + new Intl.Locale('en-u-kf-lower', options).numeric, + expected + ); } diff --git a/test/intl402/Locale/prototype/numeric/name.js b/test/intl402/Locale/prototype/numeric/name.js index 0634a4fec248c75ac72ae15a9f8f11ff35d4af3e..f35c8edd2b9d866a8edfeadbdd39f2f13ec381ef 100644 --- a/test/intl402/Locale/prototype/numeric/name.js +++ b/test/intl402/Locale/prototype/numeric/name.js @@ -13,13 +13,10 @@ includes: [propertyHelper.js] features: [Intl.Locale] ---*/ -const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numeric"); -if (propdesc !== undefined) { - const getter = propdesc.get; - verifyProperty(getter, "name", { - value: "get numeric", - writable: false, - enumerable: false, - configurable: true, - }); -} +const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numeric").get; +verifyProperty(getter, "name", { + value: "get numeric", + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/intl402/Locale/prototype/numeric/prop-desc.js b/test/intl402/Locale/prototype/numeric/prop-desc.js index 05e4d442b78924dacb86b9900e434342d1f5c80d..60daf18d36021fb92204451979062883d9a150c7 100644 --- a/test/intl402/Locale/prototype/numeric/prop-desc.js +++ b/test/intl402/Locale/prototype/numeric/prop-desc.js @@ -16,12 +16,10 @@ features: [Intl.Locale] ---*/ const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numeric"); -if (propdesc) { - assert.sameValue(propdesc.set, undefined); - assert.sameValue(typeof propdesc.get, "function"); +assert.sameValue(propdesc.set, undefined); +assert.sameValue(typeof propdesc.get, "function"); - verifyProperty(Intl.Locale.prototype, "numeric", { - enumerable: false, - configurable: true, - }); -} +verifyProperty(Intl.Locale.prototype, "numeric", { + enumerable: false, + configurable: true, +});