close
Skip to content

test: cover sqlite statements after database close#62978

Open
umuoy1 wants to merge 2 commits intonodejs:mainfrom
umuoy1:test-sqlite-close-invalidates-statements
Open

test: cover sqlite statements after database close#62978
umuoy1 wants to merge 2 commits intonodejs:mainfrom
umuoy1:test-sqlite-close-invalidates-statements

Conversation

@umuoy1
Copy link
Copy Markdown
Contributor

@umuoy1 umuoy1 commented Apr 26, 2026

This PR adds coverage for DatabaseSync closing behavior with existing prepared statements.

The tests verify that after close() or [Symbol.dispose]():

  • database methods such as prepare() and exec() report that the database is not open
  • existing StatementSync instances report that the statement has been finalized
  • reopening the database does not make old statements usable again

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/sqlite

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Apr 26, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.64%. Comparing base (bac030c) to head (81d2d8f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62978      +/-   ##
==========================================
- Coverage   89.64%   89.64%   -0.01%     
==========================================
  Files         706      706              
  Lines      219409   219409              
  Branches    42071    42072       +1     
==========================================
- Hits       196698   196689       -9     
- Misses      14609    14650      +41     
+ Partials     8102     8070      -32     

see 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants