Mocks in the unit test suite do not work when you use more than one method in the same test. #29
Labels
bug
Something isn't working
hacktoberfest
ready-to-work
Item is ready to work on it
severity-minor
Item is not urgent
Describe the bug
Mocks in the unit test suite do not work when you use more than one method in the same test.
Example: If you want to test in a method the limit with
orderBy
orwhere
with offset, won't work.To Reproduce
Steps to reproduce the behavior:
should return entities with column order by
method:herbs2knex/test/queries/find.js
Line 81 in c2ed159
the query.orderBy is not a function
Expected behavior
I expect that multiple causes in the test runner cases work's fine together
Additional context
I believe that the problem is because how the methods works overriding the knex(mock) instance to join multiple conditions in the same query.
See the find method in the image:
When the query var, receives a new query instance, the order methods that was inside the knex instance, no longer exists
The text was updated successfully, but these errors were encountered: