-
Notifications
You must be signed in to change notification settings - Fork 1
Mockable functional apis for uni tests #154
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
There should be a way to simulate mockable APIs with ram stored documents.
We could do something like this:
- put: https://github.com/phcode-dev/extensionService/blob/main/test/unit/utils/sync-test.spec.js#L35
- getFromIndex: https://github.com/phcode-dev/extensionService/blob/main/test/unit/utils/sync-test.spec.js#L53
It might be better to have first-party mock support integrated into the source. For Eg. when initing we could give init(...mockDBMode=true) and the mocks will kick in and can use the simulated in-memory db for unit tests without any code code changes for tests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request