feat: add Vitest testing framework with comprehensive test suite #47
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 introduces a complete testing infrastructure for the cloud-api project, including the Vitest testing framework, initial test coverage, CI integration, and documentation.
Context
While working on #7 (which introduces URL validation for the returnTo parameter to prevent open-redirect vulnerabilities), I noticed the related code doesn’t have unit test coverage. I may be missing something if this is covered in another repository, but I couldn’t find anything at the moment.
Changes
This PR establishes a testing foundation for the project:
Testing Framework Setup
vitest.config.tswith Node.js environment and coverage settingstest,test:watch,test:ui,test:coverageInitial Test Coverage
errors.test.ts- 9 tests)helpers.test.ts- 12 tests)releases.test.ts- 18 tests)CI/CD Integration
Documentation
Project Configuration
.gitignorefor coverage and Vitest cache directoriestsconfig.jsonfor test file compilationI would love feedback on the approach, and would like to make this part of PR review cycle.