UNPKG

@thisisagile/easy-test

Version:

Straightforward library for testing microservices built with @thisisagile/easy

25 lines (24 loc) 818 B
import { eq } from "../chunk-QE3TR4BY.mjs"; import { match } from "../chunk-LN24S2PC.mjs"; import "../chunk-6EKWTLNQ.mjs"; import "../chunk-O475TEG2.mjs"; // src/matchers/toMatchExactJson.ts var MatchesExactJson = { SubjectUndefined: "Subject is undefined.", SubsetUndefined: "Object to match with is undefined.", DoesNotMatch: "Object does not exactly match subject.", Yes: "Object matches subject exactly" }; var toMatchExactJson = (value, json) => match(value).undefined((v) => v, MatchesExactJson.SubjectUndefined).undefined(() => json, MatchesExactJson.SubsetUndefined).not((v) => eq.exact(v, json), MatchesExactJson.DoesNotMatch).else(() => MatchesExactJson.Yes); expect.extend({ toMatchExactJson }); export { MatchesExactJson, toMatchExactJson }; //# sourceMappingURL=toMatchExactJson.mjs.map