- Updated types
getChildOfMock
Utility method to return a nested child mock from a parent. Useful for partial snapshots. Quite slow so use sparingly.
- React 18
createMock
can now either be passed an object or just a string. It a string is passed then this will be mapped to the mock name (string is not sanitised, beware of dragons 🐉)
- Added typings
- Added ability to set root element for mock
- Better null handling (bug)
- Added options argument to
snapshotOf
. - Added
flushEffect
to options. This allowsuseEffect
calls to complete before the snapshot is created. - Added
create
function as sugar for usingreact-test-renderer
'sact
. No need to worry about whichact
you are importing.
- Initial release