mirror of
https://github.com/tc39/test262.git
synced 2025-05-31 04:00:34 +02:00
Improve coverage for Error.prototype.constructor
Extend coverage to include the property's enumerability, writability, and configurability.
This commit is contained in:
parent
4ec3eaaeb9
commit
f9efc46142
@ -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);
|
|
||||||
}
|
|
||||||
//
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
14
test/built-ins/Error/prototype/constructor/prop-desc.js
vendored
Normal file
14
test/built-ins/Error/prototype/constructor/prop-desc.js
vendored
Normal 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
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user