bbyars / mountebank

Over the wire test doubles
http://www.mbtest.org
MIT License
2k stars 262 forks source link

Async Support for imposterRepository needs to be deeper. #763

Open TetsujinOni opened 4 months ago

TetsujinOni commented 4 months ago

Expected behaviour

Async-first databases should be able to integrate with the mainline imposterRepository contract.

Actual behaviour

Most of the impsoterRepository contract is synchronous.

Steps to reproduce

Compare the imposterRepository contract test in this repo with the imposterRepository contract test in ibnc/mountebankMongo; the reported issues on that repo are because of the incompatible contract. The net result is errors when callsites expecting sync behavior receive a promise instead of the expected objects.

Desired Change

Furthering the move from the --datadir refactor so that imposterRepository is asynchronous so that promise-infected storage plugins are the default.

This will require work on the in-memory and datadir repository implementations, the callsites that consume the imposters, and tests.

Probably a wishlist or 2.11 target.