Move the tests from scripts/ to tests/ by feature
Unit tests go to tests/unit/<area>/, browser smoke tests to tests/smoke/<area>/, and tests against a running desktop app to tests/native/. Files named after dates, work passes, or Kanban cards get feature names, for example editorOctober12 -> editor/footnotes. scripts/ keeps the build, release, and package tools. Plugin repositories import scripts/packagePlugin.mjs, and the Terminal smoke test imports scripts/pluginMocks.mjs, which now re-exports the harness copy. The unit tests get their own type check (tests/tsconfig.json) with Node types. pnpm check runs it after the app check. Add @types/node and fix the three test mocks that it reported.
This commit is contained in:
+3
-3
@@ -55,9 +55,9 @@ The [October 13 menu and color review](archive/menu-audit-2026-10-13.md) holds t
|
||||
|
||||
| Pair | Minimum | Test |
|
||||
| --- | --- | --- |
|
||||
| `text`, `text-dim`, `text-strong`, and `accent` on `bg`, `bg-elevated`, `bg-active`, and `selection` | 4.5:1 | `scripts/appearance.spec.ts`, `scripts/themePalette.spec.ts` |
|
||||
| Each syntax role on `bg` and `bg-active` | 4.5:1 | `scripts/appearance.spec.ts` |
|
||||
| Accent selection perimeter on the selection fill | 3:1 | `scripts/malfoidPalette.spec.ts` |
|
||||
| `text`, `text-dim`, `text-strong`, and `accent` on `bg`, `bg-elevated`, `bg-active`, and `selection` | 4.5:1 | `tests/unit/theme/appearance.spec.ts`, `tests/unit/theme/themePalette.spec.ts` |
|
||||
| Each syntax role on `bg` and `bg-active` | 4.5:1 | `tests/unit/theme/appearance.spec.ts` |
|
||||
| Accent selection perimeter on the selection fill | 3:1 | `tests/unit/theme/malfoidPalette.spec.ts` |
|
||||
|
||||
`accent` on `selection` is exempt from the 4.5:1 text check. Run the tests with `pnpm test`.
|
||||
Over a user image, contrast depends on the composite surface. Measure the 82% and 90% tints over the image that the change uses. Do not claim contrast over every possible image or overlay.
|
||||
|
||||
Reference in New Issue
Block a user