Commit 01d9387
fix(tests): skip Playwright tests when browser not installed (#77)
## Task
nanoclaw Coverage Floor fix — guard Playwright-dependent tests with
skipIf
## Owned files
- `src/__tests__/signer-integration.test.ts`
- `src/signer/__tests__/docusign-executor.test.ts`
## Problem
Both files call `chromium.launch()` in `beforeAll` hooks. When
Playwright
browsers aren't installed in the CI runner, the launch crashes, the 4
affected
tests fail, and `coverage-summary.json` is never written → Coverage
Floor CI
check has been red for 8+ days.
## Fix
Added `const hasPlaywright = fs.existsSync(chromium.executablePath())`
and
wrapped both top-level `describe` blocks with
`describe.skipIf(!hasPlaywright)`.
Tests still run locally and in any runner where `npx playwright install`
was run.
## Acceptance command + output
```
npx vitest run --reporter=verbose 2>&1 | tail -10
# (shows skipped instead of crashed when no browser installed)
```
## Coverage delta
Before: N/A (coverage-summary.json was never written — check was always
failing)
After: Coverage Floor CI check unblocked; tests skip gracefully
## Auto-merge rationale
Test-only change; no production code touched. Fixes a CI infrastructure
failure.
## Codex pre-review
skipped — sub-50-LOC trivial change
## HUMAN_READABLE_SUMMARY
Two Playwright-dependent test suites were crashing the CI coverage run
by calling
chromium.launch() in environments where browsers aren't installed. This
PR adds a
one-line existsSync guard and wraps both describe blocks with
describe.skipIf so
they skip gracefully instead of crashing. Coverage Floor CI will be
unblocked once merged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2cd4571 commit 01d9387
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
0 commit comments