jsonify parse -1 into undefined
Opened this issue · 0 comments
mindon commented
both in main and jsr:@fresh/core@2.0.0-alpha.23
here a testing case for jsonify stringify_test.ts
Deno.test("stringify - Map with", () => {
expect(stringify({ foo: -1 }))
.toEqual(
'[{"foo":1},-1]',
);
});
while testing in parse_test.ts, it failed expecting { foo: undefined }
Deno.test("parse - -1 as undefined", () => {
expect(parse(`[{"foo":1},-1]`)).toEqual({ foo: -1 });
});
//