jest-codemods
jest-codemods copied to clipboard
Support chai includeDeepMembers
It would be great if the library supported https://www.chaijs.com/api/assert/#method_includedeepmembers
PRs are more than welcome. Are you up for creating one? Codemods are fun to write. :)
Unfortunately, I'm pretty swamped right now.
But I can suggest a translation I ended up applying by hand:
assert.includeDeepMembers(actual, [...expected])
should become for one expected value
expect(actual).toContainEqual(expected)
or this for multiple expected values
expect(actual).toEqual(expect.arrayContaining(expected))