Understand the test architecture layers
mainThe testing strategy is organized into four distinct layers to balance speed and coverage:
| Layer | Command | Description |
|---|---|---|
| L0 Static guards | mix test.guard | Uses Credo/static analysis to catch misuse of and/or in Window logic without running code. |
| L1 Unit (no wx) | mix test.fast | Tests the Router, Browser backend contracts, and pure Window helpers. |
| L2 Unit (mocked) | mix test.fast | Tests the Bridge wire format and handle_cast logic using mocks (e.g., Bridge.Mock). |
| L3 Integration (:wx) | xvfb-run mix test.wx | Tests the real wx environment, including connection, locale, and window lifecycle. |
| L4 App smoke | manual/CI nightly | Full application supervision order tests (e.g., desktop-example-app). |