Unit testing the SQL client
I have a function like this:
and I'm trying to unit test it. I don't want to spin up a test database, I'd just like to update the Sql service to return whatever I want to simulate in my test. The only thing I need to override is the return value of:
I've got to the point where I can use
The tests in https://github.com/tim-smart/sqlfx create a compiler and only check if the generated query and params are correct.
and I'm trying to unit test it. I don't want to spin up a test database, I'd just like to update the Sql service to return whatever I want to simulate in my test. The only thing I need to override is the return value of:
I've got to the point where I can use
Effect.updateService but I'm not sure how to override this one case because the client is an interface of many different function declarations. Does anyone here have experience with unit testing the sql client?The tests in https://github.com/tim-smart/sqlfx create a compiler and only check if the generated query and params are correct.
