test: add comprehensive race condition tests for config store

Add extensive test coverage to prevent regressions of bugs fixed in this branch:

- Test rapid sequential config updates
- Test concurrent updates preserving all fields
- Test overlapping save operations
- Test config data persistence across operations
- Test auto-granted tools not being lost
- Test custom theme colours persisting
- Test graceful error handling during saves
- Test config load/save cycle

Also update check-all.sh to run coverage for both frontend and backend tests,
matching the CI pipeline behaviour.

These tests would have caught both the config race condition and persistence
bugs we encountered, preventing future regressions.
This commit is contained in:
2026-02-07 00:12:30 -08:00
committed by Naomi Carrigan
parent ea111569af
commit f6906640e4
2 changed files with 329 additions and 3 deletions
+3 -3
View File
@@ -36,11 +36,11 @@ echo -e "${YELLOW}🔍 Running all checks for Hikari Desktop...${NC}"
run_check "Frontend lint" "pnpm lint" || failed=1
run_check "Frontend format check" "pnpm format:check" || failed=1
run_check "Frontend type check" "pnpm check" || failed=1
run_check "Frontend tests" "pnpm test" || failed=1
run_check "Frontend tests with coverage" "pnpm test:coverage" || failed=1
# Backend checks
run_check "Backend clippy (strict)" "cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings" || failed=1
run_check "Backend tests" "cargo test" || failed=1
run_check "Backend clippy (strict)" "(cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings)" || failed=1
run_check "Backend tests with coverage" "(cd src-tauri && cargo llvm-cov --fail-under-lines 50)" || failed=1
# Summary
echo -e "\n${YELLOW}========================================${NC}"