Repository navigation
5 Testing
Relevant source files
The following files were used as context for generating this wiki page:
VariantScope employs a multi-layered testing strategy to guarantee stability across its core business logic, web deployment, and Electron desktop application. The test suite combines fast, isolated unit tests with comprehensive end-to-end (E2E) workflows that simulate real user interactions, API fetches, and rendering pipelines.
graph TD
subgraph "Test Runners"
Vitest[vitest.config.js] --> UnitTests["Unit Tests (tests/unit)"]
Playwright[playwright.config.js] --> WebE2E["Web E2E Tests (tests/e2e/web.spec.js)"]
Playwright --> ElectronE2E["Electron E2E Tests (tests/e2e/electron.spec.js)"]
end
subgraph "Execution & Environment"
WebE2E --> WebServer["Vite Preview Server (localhost:4180)"]
WebE2E --> SwiftShader["WebGL SwiftShader (WEBGL_ARGS)"]
end
UnitTestConfig --> Vitest
PlaywrightConfig --> Playwright
classDef default stroke:#000,fill:none;
*Sources: vitest.config.js:1-10, playwright.config.js:1-48, tests/e2e/web.spec.js:1-13 *
Unit tests isolate individual modules within the core data pipeline and security layers, running in a lightweight Node environment via Vitest vitest.config.js:1-10. Coverage is enforced across core data handlers and critical security allowlists to catch regressions early without requiring live network calls or browser rendering engines.
For details on test suites, mock fixtures, and API response snapshots, see Unit Tests and Fixtures.
*Sources: vitest.config.js:1-10 *
Web E2E tests validate the production build inside a real browser environment against live public APIs tests/e2e/web.spec.js:1-2. Because headless CI runners lack physical GPUs, Playwright is configured with software WebGL (--use-angle=swiftshader) to ensure 3D protein structures successfully render and color correctly playwright.config.js:5-11. Tests exercise core navigation, multi-gene datasets (such as BRCA1, TP53, CFTR, and MLH1), residue selection, and bidirectional view synchronization tests/e2e/web.spec.js:17-106.
For details on Playwright projects, WebGL configuration, test helper utilities, and screenshot verification specs, see Web E2E Tests.
*Sources: playwright.config.js:1-48, tests/e2e/web.spec.js:1-161 *
Electron E2E tests target the desktop packaging layer. They verify that the desktop application properly enforces security boundaries, communicates securely across the IPC bridge, handles desktop-specific window states, and maintains offline functional integrity when local cache layers are active.
For details on security assertions, desktop menu bindings, file exports, and folder hierarchy validation, see Electron E2E Tests.
*Sources: playwright.config.js:39-39 *
Content imported from DeepWiki.