Dynamic MockApi for testing #423
Labels
I8 - Enhancement
Additional feature request
I10 - Testing
Sidecar needs tests added
Q3 - Medium
Requires decent knowledge of Sidecar/Substrate
Proposed Change or Idea
Create a more dynamic
mockApi
for our test suite. An example would be to turn the existing mockApi object, that has hardcoded values, into a function that would take a set ofdefault
key values and a set ofoption
key values as it's parameters. I think this could be useful in having more readable testing, and would encourage a wider range of testing for edge cases.For example something similar to this could work.
This is how we currently get around an edge case by overriding values in the mockApi object
This is how the proposed idea would look like
Alternatives
None I have thought of yet.
Additional Information
I think this could be a great way to organize the testing code more, and could be an enhancement for readability.
The text was updated successfully, but these errors were encountered: