You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,13 +25,13 @@ Together these suites focus on code that mutates state, touches the filesystem,
25
25
26
26
## What we deliberately skip (and why)
27
27
28
-
-**Router-to-handler wiring:** Express route-mapping tests were dropped because they duplicated framework behaviour and were brittle whenever routes were reordered. Manual smoke tests or integration tests are a better fit.
28
+
-**Router-to-handler wiring:** Express route-mapping tests were dropped because they duplicated framework behavior and were brittle whenever routes were reordered. Manual smoke tests or integration tests are a better fit.
29
29
-**System commands and hardware control (`shutdown`, `reboot`, monitor control):** they depend on Raspberry Pi hardware privileges and side effects we can’t safely stub in CI.
30
30
-**Front-end DOM or E2E coverage:** Rendering happens in the MagicMirror browser context; replicating it would require Puppeteer/Electron harnesses that are heavy relative to the payoff.
31
31
-**“Pass-through” notification wrappers:** Flows that simply forward parameters (`HIDE_ALERT`, `SHOW_ALERT`, etc.) are exercised indirectly by higher-level tests; duplicating them would be noise.
32
32
-**Git/network dependent paths:** Update and install code paths require repositories and network access. We guard their public contract via `getExternalApiByGuessing`/menu tests instead.
33
33
34
-
Documenting these gaps helps us recognise when a change might require a different kind of test (manual check, integration smoke, etc.).
34
+
Documenting these gaps helps us recognize when a change might require a different kind of test (manual check, integration smoke, etc.).
35
35
36
36
## Fixtures and shims
37
37
@@ -42,16 +42,16 @@ Documenting these gaps helps us recognise when a change might require a differen
42
42
## Potential future enhancements
43
43
44
44
- Add a focused regression test for `answerPost` when the config read stream errors mid-pipe (currently logged but unasserted).
45
-
- Capture a tiny contract test for `/api/saves` to freeze the backup timestamp ordering behaviour.
46
-
- Explore lightweight schema validation for `/api/module/available` once module metadata stabilises—could reuse the existing helper stubs.
45
+
- Capture a tiny contract test for `/api/saves` to freeze the backup timestamp ordering behavior.
46
+
- Explore lightweight schema validation for `/api/module/available` once module metadata stabilizes—could reuse the existing helper stubs.
47
47
- Consider bumping coverage thresholds modestly (for example to 10%) once the above additions land and prove stable.
48
48
49
-
These ideas stay deliberately small; larger endeavours (integration or E2E) are still considered out of scope unless requirements change.
49
+
These ideas stay deliberately small; larger endeavors (integration or E2E) are still considered out of scope unless requirements change.
50
50
51
51
## Contribution guidelines
52
52
53
53
- Prefer deterministic unit tests with explicit stubbing over fragile integration harnesses.
54
-
- Question every prospective test: if it simply mirrors production code without behaviour, it’s likely not worth adding.
54
+
- Question every prospective test: if it simply mirrors production code without behavior, it’s likely not worth adding.
55
55
- Keep pull requests focused—group related assertions in the same suite and avoid cross-cutting rewrites.
56
56
- Restore any global/mocked state (`Module._load`, timers, `fs`) in `afterEach` blocks to keep suites isolated.
0 commit comments