tests

Enforce unit and integration test structure with bun x jest.

Updated Jan 28, 2026
One-click install
npx skills add https://github.com/onchainengineer/copilot-tree --skill tests-onchainengineer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tests
Source: https://github.com/onchainengineer/copilot-tree/tree/main/.unix/skills/tests
Command: npx skills add https://github.com/onchainengineer/copilot-tree --skill tests-onchainengineer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill codifies testing doctrine and layout conventions to help teams validate software with clear, repeatable tests, avoiding ambiguity and drift.

Core Features & Use Cases

  • True integration tests use real runtimes, real filesystems, and no mocks or fakes to prove end-to-end behavior.
  • Unit tests live colocated with source as .test.ts[x] files to keep tests close to implementation.
  • Integration test harnesses live under tests/, including tests/ipc, tests/ui, and tests/e2e, with Stories in src/browser/stories for human visual verification.

Quick Start

  • Create test files alongside the code under test using the .test.ts or .test.tsx naming convention.
  • Run unit tests with bun x jest (no integration flag) and integration tests with bun x jest TEST_INTEGRATION=1.
  • Follow the repository's documented test layout to organize tests in tests/ and associated harnesses.

Frequently Asked Questions about tests

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

FAQPage Schema
How do I structure unit tests and integration tests in the same project?▼

Colocate unit tests alongside source files as .test.ts[x] and place integration test harnesses under tests/ with subdirectories like tests/ipc and tests/ui for clear separation and repeatable validation.

What is the best way to run true integration tests without mocks?▼

True integration tests use real runtimes and real filesystems without fakes or mocks, executed by setting the TEST_INTEGRATION=1 flag with bun x jest to prove end-to-end behavior accurately.

Can I run unit tests separately from integration tests using bun and jest?▼

Run unit tests with bun x jest using no integration flag, and run integration tests by passing TEST_INTEGRATION=1 to bun x jest to selectively execute the appropriate test suites.

How do I organize e2e and ui test harnesses for integration testing?▼

Organize integration test harnesses under the tests/ directory by creating specific subdirectories such as tests/ipc, tests/ui, and tests/e2e to isolate and manage end-to-end workflows.

Why should unit tests be colocated with the source code as .test.ts files?▼

Colocating unit tests as .test.ts or .test.tsx files alongside the implementation keeps tests close to the source code, reducing ambiguity and preventing structural drift across the project.

When do I need to add Stories for human visual verification in my testing workflow?▼

Add Stories in src/browser/stories when integration test harnesses under tests/ui require human visual verification to validate UI behavior beyond automated end-to-end test coverage.