Green-lights the test suite so the PR checks can enforce it:
- Fix the NextAuth v5 auth() mock typing across all integration tests (cast to a
simple async fn so mockResolvedValue accepts the session) — clears ~86 errors.
- Fix stale test values: intent 'resubmit'->'submit' / 'save'->'draft'; ParsedImportLine
.description -> .name; approvepo -> approvePo; add missing beforeEach/beforeAll imports.
- permissions: MANAGER *can* process_payment (intentional since e1340b9) — update the
stale assertion.
- po-import-parser: skip the Sample_PO.xlsx fixture tests when the file is absent (it
lives outside the repo); synthetic-workbook tests still cover the parser.
type-check is now 0 errors and unit tests pass (167 passed, 13 skipped). pr-checks.yml
flips type-check (whole project) and unit tests to HARD gates.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
17 lines
890 B
Markdown
17 lines
890 B
Markdown
<!-- All changes land via PR — no direct pushes to master. -->
|
|
|
|
## What & why
|
|
|
|
<!-- Brief summary of the change and the motivation / linked issue (e.g. Closes #NN). -->
|
|
|
|
## Checklist
|
|
|
|
- [ ] **Tests** added or updated for this change — or it is a docs/config/automation-only PR (tests not applicable). Model: the integration test on `claude/issue-12` (prod-mirror DB, raw-SQL inserts, prefix-isolated, cleans up after itself).
|
|
- [ ] **Docs** updated where relevant (App/README.md, App/CLAUDE.md, Docs/, automation/README.md, CHANGELOG.md).
|
|
- [ ] `pnpm type-check` is clean and `pnpm test` passes (the PR check enforces both).
|
|
- [ ] Verified the change (how: unit/integration tests, or a dev server on port 3100 against the test DB).
|
|
|
|
<!--
|
|
The "PR checks" workflow runs on every PR and hard-fails on: a code change with no
|
|
test change, any type-check error, or any failing unit test.
|
|
-->
|