JSON.stringify-exception-in-property-getter.js 256 B

12345678910
  1. test("Issue #3548, exception in property getter with replacer function", () => {
  2. const o = {
  3. get foo() {
  4. throw Error();
  5. },
  6. };
  7. expect(() => {
  8. JSON.stringify(o, (_, value) => value);
  9. }).toThrow(Error);
  10. });