fixup! Fix bug in test

This commit is contained in:
Mike Pennisi 2015-06-23 13:42:19 -04:00
parent 5e8b276bf5
commit ad064a631c

View File

@ -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);
}
}