UNPKG

@safejs/serializer

Version:

Serializer is a superset of JSON that includes recursive objects, dates, regular expressions, functions and others which you also can expand by yourself

9 lines (7 loc) 262 B
import { dateSerializer } from "./date"; describe("Date", () => { it("should serialize", () => { const date = "1992-12-10T12:32:21.000Z"; expect(dateSerializer.serialize(new Date(date))).toBe("1992-12-10T12:32:21.000Z"); }); });