You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to mock knex.migrate.list or db.migrate.latest and so on to implement unit tests. Is there a way to do so ?
From what I gathered, it seems to me that each time we call knex.migrate a getter returns a new Migrator instance, preventing the spies/mocks from working
Is there any way around this?
The text was updated successfully, but these errors were encountered:
Environment
Knex version: 2.0.0
Questions about how to use knex
I want to mock
knex.migrate.list
ordb.migrate.latest
and so on to implement unit tests. Is there a way to do so ?From what I gathered, it seems to me that each time we call
knex.migrate
a getter returns a new Migrator instance, preventing the spies/mocks from workingIs there any way around this?
The text was updated successfully, but these errors were encountered: