Skip to content

toHaveBeenCalledExactlyOnceWith expects an array of objects, when the object is passed as args #645

@oleksandrva

Description

@oleksandrva

Bug

  • package version: 4.0.1
  • node version: 18.16.1
  • npm version: 9.5.1
test('should render ProfileAvatar with props', async () => {
		render(<Header adminUsername={'John Doe'} onLogout={onLogoutMock} />);


		await waitFor(async () =>
			expect(ProfileAvatar).toHaveBeenCalledExactlyOnceWith({
				adminUsername: 'John Doe',
				onLogout: onLogoutMock,
			}),
		);
	});

What you did:

After the update to version 4.0.1 tests that check the call of the components with params are failing with this kind of error:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions