Since the library is most likely going to be used at the table level, we should provide an easy way to mock those top level actions so the user doesn't have to figure out how to mock the chains properly in Jest unless they want to. This was a pain point for me when using mongoose.
To Do:
[ ] Create interfaces for the different types of statements so they can be returned easily from the top level table method?
[x] Create a util function for insert
[x] Create a util function for select
[x] Create a util function for delete
[x] Create a util function for update
End goal:
I want to make one call to mock a top level action to return a specific result no matter how many methods are used in the chain.
const exampleMock = mockInsert(tableObject, results); // Returns a Jest spy
Since the library is most likely going to be used at the table level, we should provide an easy way to mock those top level actions so the user doesn't have to figure out how to mock the chains properly in Jest unless they want to. This was a pain point for me when using mongoose.
To Do:
End goal: I want to make one call to mock a top level action to return a specific result no matter how many methods are used in the chain.