Skip to content

Remove Mockgoose from Mongoose tests #1

Description

@nikeshnazareth

Mockgoose is used in tests to intercept all Mongoose calls are persist them to an in-memory database.
However, this is still unnecessarily slow, particularly if records need to be added to the database at the start of every test.

Instead, we could stub the Mongoose calls directly, which gives us more control over how to handle resetting the database (or indeed using a constant object and only tracking the changes in the tests).

https://github.com/weare2brothers/overcooked-api/ is one example of how that could work

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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