arbitrary-equivalence
v1.0.5
Published
- Compare -- Usage import configureCompare from 'compare' const compare = configureCompare(equivalenceVerifier, prepareLeftToPrint)
Downloads
8
Readme
- Compare -- Usage import configureCompare from 'compare' const compare = configureCompare(equivalenceVerifier, prepareLeftToPrint)
const { errCount, log } from compare(object_1, object_2)
errCount is a number
log is a multiple lines string (using \n) that can be passed as it is to a console.log, line this: console.log(log)
- extendExpect -- Usage import extendExpect from 'compare' extendExpect(equivalenceVerifier, prepareLeftToPrint, testFramework)
Doing the above would make it possible to do like: expect(object_1).toBeEquivalent(object_2)