Skip to content

Commit 29af425

Browse files
committed
Move render snapshots from __snapshots__ to tests/snapshots/
1 parent e565140 commit 29af425

15 files changed

Lines changed: 26 additions & 15 deletions

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tests/__snapshots__/**/*.txt text eol=lf
1+
tests/snapshots/**/*.txt text eol=lf

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,5 @@ jobs:
7676
with:
7777
name: test-results-${{ matrix.os }}-node-${{ matrix.node-version }}
7878
path: |
79-
test-results/
80-
tests/__snapshots__/
79+
tests/snapshots/
8180
retention-days: 30

CONTRIBUTING.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,24 @@ Before submitting, check that your change:
4242
## Tests
4343

4444
- `npm test` — runs the unit suite under `tests/unit/` via the in-repo Node test runner.
45-
- `npm run test:snapshots:check` — runs only the render-snapshot tests; fails on any drift in `tests/__snapshots__/`.
46-
- `npm run test:snapshots:update` — rewrites the golden files in `tests/__snapshots__/` after an intentional render change. Review the diff carefully: snapshot updates are the only signal that catches unintended UI regressions.
45+
- `npm run test:snapshots:check` — runs only the render-snapshot tests; fails on any drift in `tests/snapshots/`.
46+
- `npm run test:snapshots:update` — rewrites the golden files in `tests/snapshots/` after an intentional render change. Review the diff carefully: snapshot updates are the only signal that catches unintended UI regressions.
4747
- `npm run test:e2e` — runs the process-isolated end-to-end suite under `tests/e2e/`.
4848

4949
## CI
5050

51-
Pull requests are automatically tested via GitHub Actions. The pipeline runs:
51+
Pull requests are automatically tested via GitHub Actions. A cross-platform matrix runs on every push and PR:
5252

53-
1. **Quick-check** (Ubuntu, Node 22): `npm ci`, type check (`npx tsc --noEmit`), and security audit (`npm audit`). Catches trivial failures before the full matrix.
54-
2. **Cross-platform matrix** (depends on quick-check): Unit tests on Ubuntu (Node 22 + 24), macOS (Node 24), and Windows (Node 24). E2E tests on all platforms.
53+
| OS | Node | Runs |
54+
|---|---|---|
55+
| Ubuntu | 22 (minimum) | Type check, security audit, unit tests, E2E tests |
56+
| Ubuntu | 24 | Type check, security audit, unit tests, E2E tests |
57+
| macOS | 24 | Unit tests, E2E tests |
58+
| Windows | 24 | Unit tests, E2E tests |
5559

56-
Snapshot golden files in `tests/__snapshots__/` are stored with LF line endings (enforced by `.gitattributes`). The `normalizeEOL` helper in the snapshot test file normalizes `\r\n` to `\n` on read, so Windows developers get correct comparisons even if their working tree has CRLF. If you update snapshots, the CI matrix validates them on all platforms.
60+
Node 22 (minimum) is tested only on Linux — the primary platform and the only one guaranteed to have the oldest toolchain. macOS and Windows test Node 24 (latest) to catch regressions in the newest runtime while balancing CI cost.
61+
62+
Snapshot golden files in `tests/snapshots/` are stored with LF line endings (enforced by `.gitattributes`). The `normalizeEOL` helper in the snapshot test file normalizes `\r\n` to `\n` on read, so Windows developers get correct comparisons even if their working tree has CRLF. If you update snapshots, the CI matrix validates them on all platforms.
5763
The E2E suite runs on all platforms including Windows (verified in issue #12).
5864

5965
## Community
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
✅ gpt-4o • medium
3-
]133;A
3+
44
Here is the implementation plan. Create data access layer, add caching
5-
]133;B]133;C middleware, wire up the controller.
5+
middleware, wire up the controller.
66

File renamed without changes.

0 commit comments

Comments
 (0)