@thisisagile/easy-test
Version:
Straightforward library for testing microservices built with @thisisagile/easy
19 lines (18 loc) • 597 B
JavaScript
import {
checkDefined
} from "../chunk-Z4XAP66Q.mjs";
import "../chunk-O475TEG2.mjs";
// src/matchers/toMatchArray.ts
function toMatchArray(received, expected) {
return checkDefined(this, received, expected).not(
([r, e]) => r.length === e.length,
([r, e]) => `Received array has length ${r.length}, while expected array has length ${e.length}.`
).not(([r, e]) => r.every((el, i) => this.equals(el, e[i])), "Elements in {r} do not match elements in {e}. \n\n {diff}.").else();
}
expect.extend({
toMatchArray
});
export {
toMatchArray
};
//# sourceMappingURL=toMatchArray.mjs.map