mirror of
https://github.com/pezkuwichain/pezkuwi-dev.git
synced 2026-10-22 11:46:18 +00:00
.toEqual compared with assert.deepEqual and never looked at matchers, so expect(x).toEqual(expect.arrayContaining(...)) or .toEqual(expect.stringContaining(...)) always failed; matchers only worked inside toHaveBeenCalledWith. arrayContaining was also typed to take a string and checked value.includes(theWholeArray). .toEqual (and .not.toEqual) now apply matchers wherever they appear in the expected value, with the previous deepEqual unchanged when there are none; arrayContaining asserts that every expected entry equals (or matches) one of the array's entries. Seven new cases; with the old .toEqual six of them fail.