Newer
Older
minerva / Userland / Libraries / LibJS / Tests / builtins / JSON / JSON.stringify-exception-in-property-getter.js
@minerva minerva on 13 Jul 256 bytes Initial commit
test("Issue #3548, exception in property getter with replacer function", () => {
    const o = {
        get foo() {
            throw Error();
        },
    };
    expect(() => {
        JSON.stringify(o, (_, value) => value);
    }).toThrow(Error);
});