Example:
expect(contextSpy.sendEncodedMessage).toHaveBeenCalledWith(
expect.objectContaining({
correlationId: expect.objectContaining({ operationId: 'open' }),
subtype: 'open',
type: 'navigation',
}),
navigationMsg.TYPE,
navigationMsg.SUBTYPE.OPEN,
)
More: https://geshan.com.np/blog/2022/07/jest-tohavebeencalledwith/