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

Set up testing infrastructure #142

Merged
merged 20 commits into from
Sep 30, 2024
Merged

Conversation

Carifio24
Copy link
Member

@Carifio24 Carifio24 commented Sep 28, 2024

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.

@Carifio24 Carifio24 force-pushed the testing-setup branch 3 times, most recently from 37f8893 to 97e9f91 Compare September 29, 2024 17:23
@Carifio24 Carifio24 merged commit 5f081d3 into cosmicds:main Sep 30, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant