# Run Affected Test File In Isolation And In Co Run With Its Test

> Run Affected Test File In Isolation And In Co Run With Its Test is an Agent Skill for testing & quality published in the ZaxbyHub/opencode-swarm repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

run affected test file in isolation AND in co-run with its test-suite peers after mock cleanup changes

- Skill name: `run-affected-test-file-in-isolation-and-in-co-run-with-its-test-`
- Category: [Testing & Quality](https://www.openparable.com/skill/testing-quality/1)
- Source: https://github.com/ZaxbyHub/opencode-swarm/blob/HEAD/.opencode/skills/generated/run-affected-test-file-in-isolation-and-in-co-run-with-its-test/SKILL.md
- Repository: ZaxbyHub/opencode-swarm (401 GitHub stars when collected)

## SKILL.md

<!-- generated by opencode-swarm skill-generator. Do not edit by hand; edits will be preserved on regeneration only with controlled update mode. -->

# run affected test file in isolation AND in co-run with its test-suite peers after mock cleanup changes

## Trigger

- (no explicit trigger metadata; cluster derived from category/tags)

## Required Procedure

- run affected test file in isolation AND in co-run with its test-suite peers after mock cleanup changes

## Forbidden Shortcuts

- add top-level afterEach mock.restore without verifying co-run with sibling test files

## Delegation Template

When delegating a task affected by this skill, include:

```
SKILLS: file:.opencode/skills/generated/run-affected-test-file-in-isolation-and-in-co-run-with-its-test-/SKILL.md
```

## Reviewer Checks

- Verify each required action above appears in the diff.

## Test Engineer Checks

- Add or update tests covering the trigger condition and the forbidden shortcut.

## Source Knowledge IDs

- 1b7d37db-81d1-4b0d-90ab-85a7e68f90bf — In Bun, adding afterEach(() => mock.restore()) to fix mock isolation can break co-run with sibling test files that depend on leaked mock state. Always verify both isolated and co-run behavior before committing mock cleanup changes.

---

Source: https://www.openparable.com/skill/testing-quality/run-affected-test-file-in-isolation-and-in-co-run-with-its-test (OpenParable). Cite the canonical URL above.
