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

Adds end to end testing using Cypress and Vitest unit tests #40

Merged
merged 25 commits into from
May 14, 2024
Merged

Conversation

KSJaay
Copy link
Owner

@KSJaay KSJaay commented May 13, 2024

Summary

As Lunalytics grows, the chance of one change breaking other parts of the application also grows. I've decided to add end-to-end testing using Cypress to make sure that core features don't break. For now, this will include registering, logging in, adding a monitor, and lastly verifying users. Once more changes have been made to the settings page, more tests may be added.

I've also ended up adding some unit tests for the middleware to make sure the API is working as expected. As time goes on I'll also add tests for the classes, database, and other server-side functions.

Changes

  • Adds Cypress tests
  • Adds ids to inputs and components
  • Updates scripts to support testing
  • Adds setupDatabase function to create test database
  • Adds testing for register, signin, monitor, and verify
  • Adds Vitest unit tests
  • Adds unit tests for middleware
  • Adds unit tests for database queries
  • Fixes codebase after finding bugs during writing tests

@KSJaay KSJaay changed the title Adds end to end testing using Cypress Adds end to end testing using Cypress and Vitest unit tests May 14, 2024
@KSJaay KSJaay merged commit e99eab3 into main May 14, 2024
2 checks passed
@KSJaay KSJaay deleted the tests branch May 14, 2024 15:54
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