From e566c813b545107a26a5c5a25d0142581d3f048a Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma <usharma1998@gmail.com> Date: Tue, 18 Sep 2018 02:48:39 +0530 Subject: [PATCH] Add additional initial value tests --- .../prototype/toStringTag/initial-value.js | 10 ++++++++++ .../NumberFormat/prototype/toStringTag/prop-desc.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/test/intl402/NumberFormat/prototype/toStringTag/initial-value.js b/test/intl402/NumberFormat/prototype/toStringTag/initial-value.js index 71a99695a4..052662db2b 100644 --- a/test/intl402/NumberFormat/prototype/toStringTag/initial-value.js +++ b/test/intl402/NumberFormat/prototype/toStringTag/initial-value.js @@ -12,3 +12,13 @@ assert.sameValue( Object.prototype.toString.call(new Intl.NumberFormat()), '[object Object]' ); + +Object.defineProperty(Intl.NumberFormat.prototype, Symbol.toStringTag, { + value: 'Alpha' +}); + +assert.sameValue(Intl.NumberFormat.prototype[Symbol.toStringTag], 'Alpha'); +assert.sameValue( + Object.prototype.toString.call(new Intl.NumberFormat()), + '[object Alpha]' +); diff --git a/test/intl402/NumberFormat/prototype/toStringTag/prop-desc.js b/test/intl402/NumberFormat/prototype/toStringTag/prop-desc.js index fdba7a30eb..25fbb74f5f 100644 --- a/test/intl402/NumberFormat/prototype/toStringTag/prop-desc.js +++ b/test/intl402/NumberFormat/prototype/toStringTag/prop-desc.js @@ -8,7 +8,7 @@ description: > includes: [propertyHelper.js] ---*/ -verifyProperty(Intl.NumberFormat, Symbol.toStringTag, { +verifyProperty(Intl.NumberFormat.prototype, Symbol.toStringTag, { writable: false, enumerable: false, configurable: true -- GitLab