mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
19 lines
459 B
JavaScript
19 lines
459 B
JavaScript
test("Issue #3459, exception in computed property expression", () => {
|
|
expect(() => {
|
|
"foo"[bar];
|
|
}).toThrow(ReferenceError);
|
|
expect(() => {
|
|
"foo"[bar]();
|
|
}).toThrow(ReferenceError);
|
|
});
|
|
|
|
test("Issue #3941, exception in computed property's toString()", () => {
|
|
expect(() => {
|
|
const o = {
|
|
toString() {
|
|
throw Error();
|
|
},
|
|
};
|
|
"foo"[o];
|
|
}).toThrow(Error);
|
|
});
|