test: add comprehensive tests for v4 features

Add unit tests for sidebar manager, command palette, print preview,
main process utilities, and markdown extensions. Update jest config
to exclude untestable Electron-specific files from coverage and
raise coverage thresholds.
This commit is contained in:
2026-03-04 16:28:36 +05:30
parent 336b24365d
commit 15903e782a
6 changed files with 610 additions and 4 deletions
+6 -4
View File
@@ -20,16 +20,18 @@ module.exports = {
collectCoverageFrom: [
'src/**/*.js',
'!src/main.js', // Main process needs electron-mock
'!src/renderer.js', // Large renderer file with duplicate declarations
'!src/preload.js', // Electron preload requires contextBridge
'!**/node_modules/**'
],
// Coverage thresholds (start low, increase over time)
// Coverage thresholds (raised with expanded test suite)
coverageThreshold: {
global: {
branches: 10,
functions: 10,
lines: 10,
statements: 10
functions: 15,
lines: 15,
statements: 15
}
},