-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create test database with Knex #37
Comments
Useful blog post here: https://mherman.org/blog/test-driven-development-with-node/ |
@stuartedward and I worked on this today. We were able to set up the system to reseed the test database with additional resources. Need to investigate further how to change from test to development databases using environment variables. |
Reading https://gist.github.com/NigelEarle/70db130cc040cc2868555b29a0278261 is looks like you might be able to drop tables in knex with |
Added lines to db.js to read in environment variable NODE_ENV for use by the API. This now picks up the testing branch. Checked in the branch. |
Followed the instructions in the gist mentioned by @amcewen above to add a migration. The gist has a bug - it's missing "return" before "knex" in the Adding and Dropping Columns section. |
No description provided.
The text was updated successfully, but these errors were encountered: