testing

Run and write unit tests for server Actions and client Record Behaviors with Vitest.

1|1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/simple-platform/simple-tools --skill testing-simple-platform
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/simple-platform/simple-tools/tree/main/tools/simple-cli/internal/scaffold/templates/agent/skills/testing
Command: npx skills add https://github.com/simple-platform/simple-tools --skill testing-simple-platform

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of running and writing tests for your application's server Actions and client Record Behaviors, ensuring code quality and reliability.

Core Features & Use Cases

  • Execute Tests: Run all tests in a workspace, or target specific apps, actions, or behaviors.
  • Test Actions: Write and execute tests for server-side TypeScript Actions using mocked SDK Request/Context.
  • Test Behaviors: Write and execute tests for client-side JavaScript Record Behaviors, mocking injected globals like $form and $user.

Quick Start

Run all tests for the 'com.mycompany.crm' application.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I write tests for server-side TypeScript Actions?

You can write tests for server-side TypeScript Actions using Vitest, utilizing provided helper utilities to mock the SDK Request and Context objects for isolated and reliable execution.

Can I test client-side Record Behaviors by mocking injected globals like $form and $user?

Yes, you can test client-side JavaScript Record Behaviors by writing Vitest unit tests that mock injected globals such as $form and $user to simulate client interactions accurately.

How do I run targeted Vitest tests for a specific app, action, or behavior?

You can execute targeted Vitest tests by specifying the app, action, or behavior, allowing you to run isolated test suites rather than executing the entire workspace test suite at once.

Does this testing Skill support coverage reports and JSON output for CI integration?

Yes, the Skill supports generating coverage reports and JSON output during test execution, providing the necessary structured test results for seamless continuous integration pipelines.

What is the best way to execute all tests for a specific application workspace?

The best way to execute all tests for a specific application is to run the workspace test suite via Vitest, which automatically discovers and executes all matching Action and Behavior tests.