test(node): unskip transaction rollback and add loadFile parity coverage#410
Merged
ospfranco merged 1 commit intoMay 21, 2026
Merged
Conversation
|
Small fix re-enabling tests and adding a load file test. This was picked up previously on another PR, but did not what to add it to that one as noise. |
Contributor
|
sure, thanks! |
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
The Node test suite skipped the transaction rollback test with a comment
claiming
transaction()"doesn't properly return a promise." That claim isinaccurate —
NodeDatabase.transaction()isasyncand already doesBEGIN/await fn()/COMMIT, with acatchthat runsROLLBACKandrethrows. Unskipping the test as written passes; the skip comment was stale.
This closes the parity-coverage gaps in the Node test suite.
Changes
Transaction rollbackand tighten it: assert the inner error isrethrown and that the transient row is absent after rollback — not just an
unchanged row count, which could mask a partial commit.
// Skipped: ...comment fromTransaction commit; the testwas already running, only mislabelled.
Load SQL filetest exercisingdb.loadFile(). No test previouslycovered that path.
Test plan
cd node && npm test— 18/18 passcd node && npx tsc --noEmit— clean