-
Notifications
You must be signed in to change notification settings - Fork 3
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
Set up testing infrastructure #142
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Carifio24
force-pushed
the
testing-setup
branch
from
September 28, 2024 16:00
c61327b
to
ddb0f3b
Compare
Carifio24
force-pushed
the
testing-setup
branch
from
September 29, 2024 00:16
516e63b
to
9430af6
Compare
Carifio24
force-pushed
the
testing-setup
branch
3 times, most recently
from
September 29, 2024 17:23
37f8893
to
97e9f91
Compare
Carifio24
force-pushed
the
testing-setup
branch
from
September 29, 2024 17:39
97e9f91
to
b1a2c72
Compare
Carifio24
force-pushed
the
testing-setup
branch
from
September 29, 2024 23:23
8ee9661
to
f7da84a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR sets up some basic infrastructure for testing the API server. This ended up being surprisingly annoying to get going, so I'm going to get the basics going here and then can incrementally flesh out the test suite. There isn't much here in terms of actual testing, just hitting the root endpoint with and without an API key.
This setup is using Jest and Supertest to do the testing. The approach is that we create a
test
database in a local MySQL instance and create a test app instance that's connected to that database. We put whatever data we need for testing into that DB, do our tests, and then destroy that database when we're done.