kavilla / queryEnhancements

1 stars 4 forks source link

test: Search strategy and interceptor unit testing #24

Open Swiddis opened 2 months ago

Swiddis commented 2 months ago

I'd like to throw together some unit tests for our search strategies and interceptors. This probably involves setting up a test harness that includes the full context for an interceptor, which can be tricky since it has a lot of dependencies (it seems like we need to simulate several OS backend functions and set up lots of input objects/context).

Swiddis commented 2 months ago

Added strategy in #26, but interceptor is tricky. Has a lot of different deps and standard core mocks aren't sufficient -- spent a few hours trying to chase all the refs and didn't get to the bottom of it. Might need to add mocking infrastructure elsewhere before adding interceptor tests.