UNPKG

@thisisagile/easy-test

Version:

Straightforward library for testing microservices built with @thisisagile/easy

18 lines (17 loc) 622 B
import { match } from "../chunk-LN24S2PC.mjs"; import "../chunk-6EKWTLNQ.mjs"; import "../chunk-O475TEG2.mjs"; // src/matchers/toBeQueriedWith.ts var toBeQueriedWith = (query, expected) => match(query?.mock?.calls).undefined((c) => c, "Query is unknown.").not((c) => c.length === 1, "Query did not execute.").not( (c) => c[0][0].toString() === expected?.toString(), (c) => `We expected query '${expected}', but we received query '${c[0][0]}' instead.` ).else(`Received query does match '${expected}'`); expect.extend({ toBeQueriedWith }); export { toBeQueriedWith }; //# sourceMappingURL=toBeQueriedWith.mjs.map