Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Add StubCollections.reset to public API #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[Proposal] Add StubCollections.reset to public API #34

wants to merge 1 commit into from

Conversation

wanecek
Copy link

@wanecek wanecek commented Jul 30, 2019

Removes all documents from stubbed collections, which is useful
when running multiple tests with different documents.

I've frequently found myself needing to reset the documents in a collection beforeEach test when testing different documents in different scenarios. Currently, the only way to do this is to restore, re-add and re-stub before every test, which seems like an antipattern.

Happy to get feedback, comments, or suggestions :)

Removes all documents from stubbed collections, which is useful
when running multiple tests with different documents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant