Knex object cannot be correctly formatted
krzkaczor opened this issue · 1 comments
krzkaczor commented
expect(processRangeMock).toHaveBeenCalledExactlyWith([
[0, 1, expect.anything()], // here anything is knex transaction
[2, 3, expect.anything()],
[4, 5, expect.anything()],
[6, 7, expect.anything()],
])
[31mAssertionError: Mock was not called exactly with [4 entries] but was expected to�[0m
�[32m+ expected�[0m �[31m- actual�[0m
withSchema: function [anonymous]()
}
]
[
�[31m- 5�[0m
6
�[31m- function knex() & {�[0m
�[31m- _events: [custom prototype] {}�[0m
�[31m- _eventsCount: 0�[0m
�[31m- _internalListeners: [�[0m
�[31m- {�[0m
�[31m- eventName: "start"�[0m
�[31m- listener: function [anonymous]()�[0m
�[31m- }�[0m
�[31m- {�[0m
�[31m- eventName: "query"�[0m
�[31m- listener: function [anonymous]()�[0m
�[31m- }�[0m
�[31m- {�[0m
�[31m- eventName: "query-error"�[0m
�[31m- listener: function [anonymous]()�[0m
�[31m- }�[0m
sz-piotr commented
I tested this with knex 2.4.2. Cannot reproduce.