Skip to content

Commit c2abdee

Browse files
fix(ci): resolve all 4 failing CI checks for PR #1280
- Fix Backend npm test: mock stream-runway-worker and add missing logger.error/warn to workers.index.test.ts to prevent unhandled rejection from startStreamRunwayWorker - Fix Frontend CI test failures (79 tests): add react/react-dom overrides (19.2.7) to package.json to eliminate dual-React copies (19.2.7 vs 19.2.8) that caused "Cannot read properties of null (reading 'useState')" in all hook-using tests - Fix Frontend CI coverage threshold: restore vitest coverage thresholds from 18% back to 20% (functions and lines) - npm audit --audit-level=high passes with 0 vulnerabilities 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
1 parent a2cf4b1 commit c2abdee

4 files changed

Lines changed: 18 additions & 37 deletions

File tree

backend/tests/workers.index.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ vi.mock('../src/workers/soroban-event-worker.js', () => ({
99
},
1010
}));
1111

12+
vi.mock('../src/workers/stream-runway-worker.js', () => ({
13+
startStreamRunwayWorker: vi.fn(() => 123),
14+
}));
15+
1216
vi.mock('../src/logger.js', () => ({
1317
default: {
1418
info: vi.fn(),
19+
error: vi.fn(),
20+
warn: vi.fn(),
1521
},
1622
}));
1723

frontend/vitest.config.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@ export default defineConfig({
1717
],
1818
all: true,
1919
thresholds: {
20-
// Lowered from 20 → 18 to give the suite more headroom against
21-
// coverage drift. Current measured coverage is 19.85%; setting
22-
// this to 18 avoids spurious threshold failures when a tiny
23-
// amount of new code lands without proportional new tests.
24-
functions: 18,
25-
lines: 18,
20+
functions: 20,
21+
lines: 20,
2622
},
2723
},
2824
},

package-lock.json

Lines changed: 7 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
"overrides": {
3838
"postcss": "^8.5.23",
3939
"sharp": "^0.35.0",
40-
"deepmerge-ts": "^8.0.0"
40+
"deepmerge-ts": "^8.0.0",
41+
"react": "19.2.7",
42+
"react-dom": "19.2.7"
4143
}
4244
}

0 commit comments

Comments
 (0)