test: unit tests for all repositories#66
Merged
greatest0fallt1me merged 2 commits intoCalloraOrg:mainfrom Feb 26, 2026
Merged
Conversation
Contributor
|
please resolve the conflicts |
1 similar comment
Contributor
|
please resolve the conflicts |
Contributor
Author
|
@greatest0fallt1me I have a few merge conflicts here, mostly in the package.json and lockfile. My laptop is currently dead and I'm waiting for power/charge to get back online. I’ll resolve these as soon as I’m back at my desk to ensure the lockfile stays perfectly in sync and the JSON remains valid. Thanks for your patience! |
This file contains hidden or 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
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.
Summary
This PR introduces the foundational data access layer and its corresponding isolated unit test suite, ensuring strict database parity by running against a real PostgreSQL instance instead of an in-memory SQLite mock.
Related Issue
Closes #46
Changes Implemented
pgconnection pool insrc/db.tsconfigurable viaDATABASE_URL.ApiRepositoryclass with standard CRUD operations (create,findById,findAll,update).vitestwith@vitest/coverage-v8to enforce a strict 95% minimum coverage threshold globally on thesrc/repositoriesdirectory.beforeAlland execute aTRUNCATE TABLE apis RESTART IDENTITY CASCADE;inbeforeEachto guarantee zero data bleeding between tests.Verification