-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
The bigger the test suite for integration tests becomes, the harder it's to achieve a certain state for a test case. Opening this issue as a ground for discussion on how things could be improved.
As an example, checking if a certain record belongs to a specific relational filter takes to look up:
posts
collection inbase.json
,- compare it with records in
many-to-many.json
- go back to
base.json
and checktags
collection there
When there are multiple records/properties matching this 3 step process becomes over cumbersome.
One of the thoughts around making things easier to check would be not having a global state like base.json
but a set of helper functions that would set up the state in few steps. The downside of this approach is more work in the test case setup, but than it's a lot more clear which cases are being expected to be returned. Hard to find a good middle ground here 🤷♂️
Don't have any specific recepie and current approach is good enough :) Just opening this issue as a discussion to try improve future test suite maintenance and development.