mirror of
https://github.com/tc39/test262.git
synced 2025-05-24 00:30:29 +02:00
fixup! Fix bug in test
This commit is contained in:
parent
5e8b276bf5
commit
ad064a631c
@ -14,21 +14,14 @@ var p = Promise.resolve("foo");
|
|||||||
|
|
||||||
Object.defineProperty(p, "constructor", {
|
Object.defineProperty(p, "constructor", {
|
||||||
get: function () {
|
get: function () {
|
||||||
throw new Error("abrupt completion");
|
throw new Test262Error();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
assert.throws(Test262Error, function() {
|
||||||
p.then(function () {
|
p.then(function() {
|
||||||
$ERROR("Should never be called.");
|
$ERROR("Should never be called.");
|
||||||
}, function () {
|
}, function() {
|
||||||
$ERROR("Should never be called.");
|
$ERROR("Should never be called.");
|
||||||
});
|
});
|
||||||
} catch (e) {
|
});
|
||||||
if (!(e instanceof Error)) {
|
|
||||||
$ERROR("Expected Error, got " + e);
|
|
||||||
}
|
|
||||||
if (e.message !== "abrupt completion") {
|
|
||||||
$ERROR("Expected the Error we threw, got " + e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user