Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The app runs at [http://localhost:3000](http://localhost:3000). There is no back
| `pnpm dev` | Start the dev server with hot reload |
| `pnpm build` | Production build (must pass before merging) |
| `pnpm start` | Serve the production build locally |
| `pnpm lint` | ESLint (Next.js + TypeScript rules) |
| `pnpm lint` | ESLint (Next.js + TypeScript rules); any warning fails it, like an error |
| `pnpm typecheck` | `tsc --noEmit` in strict mode |
| `pnpm test` | Unit tests with Vitest (`lib/**` and `packages/*/src/**`) |
| `pnpm test:e2e` | Playwright tests against the production build: routes, flows, axe (see below) |
Expand Down
3 changes: 2 additions & 1 deletion lib/color/matrix.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { describe, expect, test, vi } from "vitest";

import type * as ColorModule from "@/lib/color/color";
import { apcaContrast, fromHex } from "@/lib/color/color";
import { apcaLevel, matrixCell } from "@/lib/color/matrix";

// Pass through to the real implementation, but let a test pin an exact Lc for one call.
vi.mock("@/lib/color/color", async (importOriginal) => {
const actual = await importOriginal<typeof import("@/lib/color/color")>();
const actual = await importOriginal<typeof ColorModule>();
return { ...actual, apcaContrast: vi.fn(actual.apcaContrast) };
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "next build",
"postbuild": "node scripts/generate-service-worker.mjs",
"start": "next start",
"lint": "eslint .",
"lint": "eslint . --max-warnings 0",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test:e2e": "playwright test",
Expand Down
Loading