Improve coverage for Error.prototype.constructor

Extend coverage to include the property's enumerability, writability,
and configurability.
This commit is contained in:
Mike Pennisi 2021-07-19 22:58:25 -04:00 committed by Rick Waldron
parent 4ec3eaaeb9
commit f9efc46142
2 changed files with 14 additions and 18 deletions

View File

@ -1,18 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The initial value of Error.prototype.constructor is the built-in Error
constructor
es5id: 15.11.4.1_A1_T1
description: Checking Error.prototype.constructor
---*/
//////////////////////////////////////////////////////////////////////////////
//CHECK#1
if (Error.prototype.constructor !== Error) {
throw new Test262Error('#1: Error.prototype.constructor === Error. Actual: ' + Error.prototype.constructor);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,14 @@
// Copyright (c) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-error.prototype.constructor
description: Property descriptor of Error.prototype.constructor
includes: [propertyHelper.js]
---*/
verifyProperty(Error.prototype, 'constructor', {
enumerable: false,
writable: true,
configurable: true,
value: Error
});