Check a test fix (heal guard)
check-test-changeChecks changed Playwright tests against a git ref or proposed file to block weakened assertions, skipped tests, and .only, and warn on weaker matchers or force flags before committing.
Instructions
Heal guard: check that changed tests were not made to pass by checking less. Compares spec files with a git ref (default HEAD = uncommitted changes) or one proposed file (file + after). BLOCK on deleted assertions, skipped/removed tests or .only; WARN on weaker matchers, waitForTimeout, force: true, swallowed errors, raised timeouts or retries. Run it after any AI fix, before committing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Git ref to compare with: 'HEAD' (default: uncommitted changes), 'origin/main' (the whole branch) | |
| file | No | With after: the spec file a fix would change | |
| after | No | With file: the fix's full new file content, checked before it is written | |
| files | No | Only these files (default: every changed spec file and playwright config) | |
| projectRoot | No | Project directory (default: server root) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | false when the call failed (see error) or the tests it ran failed | |
| error | No | ||
| total | No | ||
| status | No | ||
| findings | No |