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

Programmatic interface for integration tests usage #16

Closed
2 tasks done
antoinechalifour opened this issue Aug 17, 2019 · 0 comments · Fixed by #17
Closed
2 tasks done

Programmatic interface for integration tests usage #16

antoinechalifour opened this issue Aug 17, 2019 · 0 comments · Fixed by #17

Comments

@antoinechalifour
Copy link
Owner

antoinechalifour commented Aug 17, 2019

As of today, Memento can be used for stubbing external services in integration tests, but Memento has to be run manually outside the test suite, and the cache-location is shared with the dev environment.

This can be improved. The ideal integration would be to setup Memento in a beforeAll hook (assuming an API similar to jest), and kill Memento in an afterAll hook.

To provide this integration, the following must be done :

  • export memento not as a CLI binary but as a Node module
  • provide a new option for customizing the cache directory (.memento-cache at the moment). For instance, users could decide to cache requests in memento-integration and decide to track this file in the VCS
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 a pull request may close this issue.

1 participant