writing-tests

Enforce bun:test testing standards and CI structure for opencode-swarm.

437|45|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/zaxbysauce/opencode-swarm --skill writing-tests-zaxbysauce
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-tests
Source: https://github.com/zaxbysauce/opencode-swarm/tree/main/.opencode/writing-tests
Command: npx skills add https://github.com/zaxbysauce/opencode-swarm --skill writing-tests-zaxbysauce

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guidelines for writing, organizing, and maintaining tests in the opencode-swarm repository. It covers framework rules (bun:test), mock isolation, CI pipeline structure, file placement, and anti-patterns that break cross-platform CI. Load this skill before writing or modifying any test file.

Core Features & Use Cases

  • Framework rules: bun:test usage and consistency across test files
  • Mock isolation: prevents cross-file mock leakage in Bun processes
  • CI and file placement: structure tests to align with the project CI workflow
  • Anti-patterns: common pitfalls that disrupt cross-platform CI
  • Use Case: when introducing new tests, load this skill to align with conventions

Quick Start

Load this skill before creating or modifying tests to ensure proper structure and CI alignment.

Frequently Asked Questions about writing-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure tests for bun:test to avoid cross-file mock leakage?

To prevent mock leakage with bun:test, ensure strict mock isolation within Bun processes. This involves structuring test directories and applying isolation guidelines to keep mocks from affecting other test files during execution.

What are common cross-platform CI anti-patterns when writing tests?

Common cross-platform CI anti-patterns include improper file placement and poor test structure that disrupt the pipeline. Aligning test organization with project CI workflow rules prevents these failures and ensures consistent execution across environments.

How do I organize test files to align with CI pipeline structure?

Organize test files by following project-specific CI pipeline structure and file placement rules. This ensures tests are discovered correctly and run consistently across different stages of the continuous integration workflow.

When do I need to load testing guidelines before modifying test files?

Load testing guidelines before introducing new tests or modifying existing ones. This ensures you follow bun:test framework rules, maintain mock isolation, and align with project conventions safely before making changes.

Does bun:test work well with cross-platform CI workflows?

Bun:test works with cross-platform CI workflows when paired with proper test structure and mock isolation. Avoiding common anti-patterns and aligning file placement with CI stages ensures safe and consistent execution across environments.