ladybird/Userland/Libraries/LibJS/Tests/builtins/JSON/JSON.stringify-exception-in-property-getter.js
2021-01-12 12:17:46 +01:00

10 lines
256 B
JavaScript

test("Issue #3548, exception in property getter with replacer function", () => {
const o = {
get foo() {
throw Error();
},
};
expect(() => {
JSON.stringify(o, (_, value) => value);
}).toThrow(Error);
});