You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a number of tests in tests/integration/worker/entity.js that were made before we had more of the API in place that we might be able to remove. This file could be made to focus just on the entity worker?
I find myself either forgetting about this file, or over-relying on this file as a kind of catch-all of entity workflow test scenarios. For example, I'm writing entity update tests here because I'm not sure where else they should go... in the GET entities/uuid endpoint? Sometimes I want to test one scenario, like entity updates, and maybe check that multiple endpoints look as expected instead of duplicating the scenario across the tests for different endpoints.
Do other people have issues with not knowing where to put tests? Suggestions?
The text was updated successfully, but these errors were encountered:
For getodk/central#385, existing tests of the form worker were in test/integration/api/forms/forms.js and test/integration/api/forms/draft.js. I think that's because the worker is triggered by the endpoints to create a form or draft or to publish a draft. By that logic though, we should test the entity worker in the tests of the submission creation endpoints, and that doesn't feel right. 🤔 I feel like there are multiple reasonable options here. If this feels like a special case since it touches so many endpoints and is about a larger workflow, one option might be that we move these tests to their own file or set of files.
Addressed in PR #1021
There are a number of tests in
tests/integration/worker/entity.js
that were made before we had more of the API in place that we might be able to remove. This file could be made to focus just on the entity worker?I find myself either forgetting about this file, or over-relying on this file as a kind of catch-all of entity workflow test scenarios. For example, I'm writing entity update tests here because I'm not sure where else they should go... in the GET entities/uuid endpoint? Sometimes I want to test one scenario, like entity updates, and maybe check that multiple endpoints look as expected instead of duplicating the scenario across the tests for different endpoints.
Do other people have issues with not knowing where to put tests? Suggestions?
The text was updated successfully, but these errors were encountered: