dwyl / dwyl/book

How to reset test database before each test run?

Open
#44 5 comments 1 reaction 0 assignees View on GitHub
enhancement question
Dominant language
Rust
Stars
826
Forks
133
PR merge metrics
No merged PRs in 30d

Description

In order to have repeatable tests it seems a good idea to have a test database populated with known data against which to write the tests. Populating this database is straightforward and resetting it could be as simple as dropping it at the end of the test. But adding an automated `drop database` to my test scripts seems like a very bad idea since a config error could easily result in dropping a production database. Any suggestions? I'm using MongoDB and Mocha/Karma/Protractor.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.