test-conventions

Enforce bun:test conventions for Key0 SDK test files.

96|5|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/key0ai/key0 --skill test-conventions-key0ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-conventions
Source: https://github.com/key0ai/key0/tree/main/.claude/skills/test-conventions
Command: npx skills add https://github.com/key0ai/key0 --skill test-conventions-key0ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces consistent and efficient testing methodologies for the Key0 SDK, ensuring reliability and maintainability across all test suites.

Core Features & Use Cases

  • Standardized Imports: Ensures all tests use bun:test and specific imports.
  • Factory Pattern: Promotes reusable configuration and setup helpers for tests.
  • Injectable Clock: Facilitates time-based testing without relying on system time.
  • Mocking Utilities: Provides tools for mocking payment adapters and stores.
  • Concurrency & Error Assertions: Defines patterns for robust testing of race conditions and error handling.
  • Use Case: When developing new features for the Key0 SDK, use these conventions to write tests that are clear, repeatable, and cover all critical aspects of the functionality.

Quick Start

Use the test-conventions skill to generate a new test file following the established patterns for the Key0 SDK.

Frequently Asked Questions about test-conventions

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

FAQPage Schema
How do I standardize bun:test imports and factory patterns for SDK development?

Standardizing bun:test imports involves enforcing specific import statements and reusable factory helpers for configuration setup. This ensures all SDK tests adhere to defined patterns for reliable state management and consistent initialization.

What is the best way to mock payment adapters and stores in a bun:test environment?

Mocking payment adapters and stores in a bun:test environment utilizes provided mocking utilities to simulate interactions. This standardizes adapter testing practices to ensure reliable validation without relying on actual external payment systems.

How do I test time-based logic in an SDK without relying on system time?

Testing time-based logic without system time requires using an injectable clock pattern within your test suite. This facilitates deterministic time-based testing by allowing explicit control over time progression during test execution.

How do I write concurrency and error assertions for SDK race conditions using bun:test?

Writing concurrency and error assertions for race conditions involves applying defined bun:test patterns for robust testing. This validates error handling and concurrent operations to ensure reliable SDK behavior under simultaneous execution loads.

Does the test-conventions skill support testing frameworks other than bun:test?

The test-conventions skill exclusively enforces exact bun:test conventions and does not support other testing frameworks. It standardizes SDK testing practices by requiring all tests to use bun:test for imports, mocking, and assertions.

Why use standardized testing conventions for SDK state management and configuration?

Using standardized testing conventions for SDK state management ensures tests are clear, repeatable, and cover critical functionality. This enforces consistent methodologies across test suites, improving reliability and maintainability during SDK development.