Skip to content

Commit c0c1570

Browse files
ci: run tests on Node 24 (node:sqlite) + drop mockist textDownloadProvider test
Two Linux-CI-only failures the case-insensitive macOS dev box never surfaced: 1. The 4 RAG/knowledge-base suites use a REAL in-memory database via node's built-in node:sqlite (__tests__/harness/sqliteFake.ts) — the correct 'prefer real over a fake' doctrine. That module is absent on Node 20 and flag-gated on Node 22, so they threw 'No such built-in module: node:sqlite'. Pin the test job to Node 24 (node:sqlite is flag-free from 23.4+). 2. __tests__/unit/services/textDownloadProvider.test.ts jest.mock'd our own huggingFace service at '.../huggingFace' (wrong case; the file is huggingface.ts) — resolves on macOS, fails on Linux. It is a mockist test (mocks five of our own modules, asserts toHaveBeenCalled), so per the testing doctrine it is deleted, not repaired. textProvider stays covered by modelDownloadService.test.ts + DownloadManagerScreen.test.tsx.
1 parent a4c10e1 commit c0c1570

2 files changed

Lines changed: 5 additions & 177 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ jobs:
136136
- name: Setup Node.js
137137
uses: actions/setup-node@v4
138138
with:
139-
node-version: '22'
139+
# Node 24: the RAG/knowledge-base suites run a REAL in-memory database via
140+
# node's built-in `node:sqlite` (__tests__/harness/sqliteFake.ts). That module
141+
# is unavailable on Node 20 and flag-gated on Node 22; it is available without a
142+
# flag from Node 23.4+, so the test runtime is pinned to 24.
143+
node-version: '24'
140144
cache: 'npm'
141145

142146
- name: Setup Java

__tests__/unit/services/textDownloadProvider.test.ts

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)