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

Refactor tests to use proper "build-up" and "tear-down" hooks to reset the db before/after each test suite is run. #13

Open
r002 opened this issue Jul 11, 2020 · 0 comments
Assignees

Comments

@r002
Copy link
Owner

r002 commented Jul 11, 2020

Eventually, "npm test" will run all test suites in parallel. I have two options:

  1. Either refactor the code to use "clients" from the pool which will give me transaction management. This way I can easily commit transactions and roll them back after every test-suite is run without having to reset the db each time.

  2. Spin up a new db instance (Docker?) for each individual test-suite. After each test-suite finishes, I then just discard its db image.


@r002 r002 self-assigned this Jul 11, 2020
r002 added a commit that referenced this issue Jul 11, 2020
…et the test db before/after each test suite is run.
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

1 participant