Skip to content

value '...actual' is not correct for toHaveBeenCalledExactlyOnceWith fail case #672

Open
@lcialon

Description

@lcialon
test('jest mock', () => {
    const mock = jest.fn();
    mock('hello', 1);
    expect(mock).toHaveBeenCalledExactlyOnceWith('hello', 3);
  }

Output:

expect(received).toHaveBeenCalledExactlyOnceWith(expected)
Expected mock function to have been called exactly once with ["hello", 3], but it was called with "hello"

Should be something like:

Expected mock function to have been called exactly once with ["hello", 3], but it was called with "hello", 1

OR even better:

Expected mock function to have been called exactly once with ["hello", 3], but it was called with ["hello", 1]

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