mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
LibJS: Add assertThrowsError() test function
This commit is contained in:
committed by
Andreas Kling
parent
c5730ed6a3
commit
0718f216af
@@ -26,12 +26,11 @@ try {
|
||||
assert(d.writable === true);
|
||||
assert(d.value === "ho");
|
||||
|
||||
try {
|
||||
assertThrowsError(() => {
|
||||
Object.defineProperty(o, "bar", { value: "xx", enumerable: false });
|
||||
assertNotReached();
|
||||
} catch (e) {
|
||||
assert(e.name === "TypeError");
|
||||
}
|
||||
}, {
|
||||
error: TypeError
|
||||
});
|
||||
|
||||
Object.defineProperty(o, "baz", { value: 9, configurable: true, writable: false });
|
||||
Object.defineProperty(o, "baz", { configurable: true, writable: true });
|
||||
|
||||
Reference in New Issue
Block a user