Simplify the testing

The last five lines below are simply WRONG and not according to the spec. 

```
const durationFormat = new Intl.DurationFormat();

verifyNotEnumerable(durationFormat, Symbol.toStringTag);
verifyNotWritable(durationFormat, Symbol.toStringTag);
verifyConfigurable(durationFormat, Symbol.toStringTag);
```
This commit is contained in:
Frank Yung-Fong Tang 2021-12-09 14:45:37 -08:00 committed by Rick Waldron
parent 6d0a4fdac7
commit 29a0a1e253
1 changed files with 6 additions and 17 deletions

View File

@ -11,20 +11,9 @@ features: [Intl.DurationFormat, Symbol.toStringTag]
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
assert.sameValue( verifyProperty(Intl.DurationFormat.prototype, Symbol.toStringTag, {
Object.prototype.toString.call(Intl.DurationFormat.prototype), value: "Intl.DurationFormat",
'[object Intl.DurationFormat]', writable: false,
'prototype - Initial value of @@toStringTag is not Intl.DurationFormat', enumerable: false,
); configurable: true
});
assert.sameValue(
Object.prototype.toString.call(new Intl.DurationFormat()),
'[object Intl.DurationFormat]',
'new call - Initial value of @@toStringTag is not Intl.DurationFormat',
);
const durationFormat = new Intl.DurationFormat();
verifyNotEnumerable(durationFormat, Symbol.toStringTag);
verifyNotWritable(durationFormat, Symbol.toStringTag);
verifyConfigurable(durationFormat, Symbol.toStringTag);