mirror of https://github.com/tc39/test262.git
Update test to not rely on throwing a Test262Error
Only this test relied on $ERROR throwing a catchable Test262Error. This change allows test environments to provide their on $ERROR function for better error reporting.
This commit is contained in:
parent
9d7378cdba
commit
6c8698acac
|
@ -37,15 +37,18 @@ class B {
|
|||
|
||||
assert.sameValue(typeof B.name, 'function');
|
||||
|
||||
var isDefined = false;
|
||||
class C {
|
||||
static get name() {
|
||||
if (isDefined) {
|
||||
return 'pass';
|
||||
}
|
||||
$ERROR('Static `get` accessor should not be executed during definition');
|
||||
}
|
||||
}
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
C.name;
|
||||
});
|
||||
isDefined = true;
|
||||
assert.sameValue(C.name, 'pass');
|
||||
|
||||
class D {
|
||||
static set name(_) {
|
||||
|
|
Loading…
Reference in New Issue