In order to ignore a certain parameter in a jest method call assertion you can do the following
function test(param1, param2) { ... } const mock = jest.fn(); ... mock(3, 2); expect(mock).toHaveBeenCalledWith(jest.anything(), 2);