Skip to content

Programmatic interface for integration tests usage #16

@antoinechalifour

Description

@antoinechalifour

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions