testbox-unit-xunit

Official

Write reliable xUnit tests for TestBox

AuthorColdBox
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Provide clear patterns and conventions for writing deterministic, maintainable xUnit-style unit tests in TestBox so developers can validate CFC services, models, and utilities in isolation without fragile setup or inconsistent assertions.

Core Features & Use Cases

  • Lifecycle guidance for global and per-test setup and teardown using beforeTests, afterTests, setup, and teardown to manage shared resources and ensure test isolation.
  • Assertion and matcher usage with the $assert API and BoxLang dynamic assertion helpers, plus mixing fluent expect() matchers when desired.
  • Mocking and Arrange-Act-Assert examples for unit-testing service logic, verifying interactions, skipping conditional tests, and registering custom reusable assertions.

Quick Start

Create an xUnit TestBox spec that uses beforeTests to initialize shared fixtures, setup/teardown to prepare per-test state, and testXxx functions that assert behavior with $assert.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: testbox-unit-xunit
Download link: https://github.com/ColdBox/skills/archive/main.zip#testbox-unit-xunit

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.