Skip to content
Snippets Groups Projects
Commit ad064a63 authored by Mike Pennisi's avatar Mike Pennisi
Browse files

fixup! Fix bug in test

parent 5e8b276b
No related branches found
No related tags found
No related merge requests found
......@@ -14,21 +14,14 @@ var p = Promise.resolve("foo");
Object.defineProperty(p, "constructor", {
get: function () {
throw new Error("abrupt completion");
throw new Test262Error();
}
});
try {
p.then(function () {
$ERROR("Should never be called.");
}, function () {
$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);
}
}
assert.throws(Test262Error, function() {
p.then(function() {
$ERROR("Should never be called.");
}, function() {
$ERROR("Should never be called.");
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment