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

Mock once feature #3

Open
zifeo opened this issue Sep 25, 2022 · 2 comments
Open

Mock once feature #3

zifeo opened this issue Sep 25, 2022 · 2 comments

Comments

@zifeo
Copy link

zifeo commented Sep 25, 2022

Hey, it would be very convient to have a utility function to mock the route and remove the route straight after it gets 1 call. Maybe even a mock_n one.

@clo4
Copy link
Owner

clo4 commented Sep 29, 2022

I like it! Can immediately see why that's useful.

Technically this could be implemented entirely as a wrapper function, but including in the library itself would be way better.

I'm planning to update the router dep (see #2) but hit some unexpected trouble with that. Once that's done I'll introduce this feature.

Also planning to take a look at the API surface of this module... I don't love it right now. Would appreciate your input on how it could be improved!

@zifeo
Copy link
Author

zifeo commented Oct 1, 2022

@separaterecords Thanks for getting back. I believe it would be really useful to have also something to check whether the routes were called or not thus enforcing a stronger test process.

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

No branches or pull requests

2 participants