stratal-testing

Compile Stratal modules with provider overrides and simulate HTTP requests.

10|1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/strataljs/stratal --skill stratal-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stratal-testing
Source: https://github.com/strataljs/stratal/tree/main/.agents/skills/stratal-testing
Command: npx skills add https://github.com/strataljs/stratal --skill stratal-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of writing comprehensive tests for Stratal applications, ensuring reliability and robustness by providing utilities for module compilation, HTTP testing, and mocking.

Core Features & Use Cases

  • TestingModule: Compile and test Stratal modules with provider overrides and environment configuration.
  • HTTP Testing: A fluent client for making requests and asserting responses within tests.
  • Mocks & Fakes: Utilities like FakeStorageService and createFetchMock for isolating dependencies.
  • Auth Testing: Helpers like ActingAs to simulate authenticated users.
  • Use Case: When developing a new API endpoint in a Stratal application, use this Skill to create a test suite that verifies the endpoint's functionality, response codes, and data integrity under various conditions.

Quick Start

Use the stratal-testing skill to create a test module for the UsersModule and override the EMAIL_TOKEN provider with a mock email service.

Frequently Asked Questions about stratal-testing

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

FAQPage Schema
How do I test a Stratal application module with overridden providers?

HTTP request simulation in Stratal tests is handled through a fluent HTTP testing client that lets you make requests and directly assert response codes and data integrity within your test suite.

What is the best way to mock dependencies in a Stratal integration test?

The best way to mock dependencies in a Stratal integration test is using built-in utilities like FakeStorageService and createFetchMock, which isolate external dependencies for reliable testing.

How do I simulate an authenticated user when testing a Stratal API endpoint?

To simulate an authenticated user when testing a Stratal API endpoint, you use the ActingAs helper utility to easily generate authenticated requests within your test cases.

Do I need to install a separate package for Stratal testing utilities?

Yes, you need to install the @stratal/testing package to access the required utilities for module compilation, HTTP testing, and mocking in your Stratal application test suites.