import { describe, test, expect } from "vitest";
import { Serde } from "@daiso-tech/core/serde";
import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/super-json-serde-adapter";
import { flexibleSerdeTestSuite } from "@daiso-tech/core/serde/test-utilities";
describe("class: Serde", () => {
flexibleSerdeTestSuite({
createSerde: () => new Serde(new SuperJsonSerdeAdapter()),
test,
expect,
});
});
The
flexibleSerdeTestSuitefunction simplifies the process of testing your custom implementation ofIFlexibleSerdewithvitest.IMPORT_PATH:
"@daiso-tech/core/serde/test-utilities"