Open mlarcher opened 3 years ago
Seems like this is because a single, shared instance of MockKnex is exported: https://github.com/jbrumwell/mock-knex/blob/master/src/index.js#L103 ?
Would be awesome if the MockKnex
class was exported as well, so we could create multiple MockKnex
instances.
We have a codebase that needs to connect to a secondary database for sync purpose. Adding
mockKnex.mock(connection);
to this secondary database connection breaks the main database connection. This is unexpected, as we pass the actual specific connection to mockKnex.mock(). Is there a workaround to that behavior ?Here's an example of what that looks like :