medusa-testing

medusa-testing is a skill for Claude Code from OrcaQubits/agentic-commerce-skills-plugins. It costs 45 tokens per session (1,524 once invoked), scanned A, original, MIT.

A testing guide for Medusa v2 applications, using Jest and Medusa's integration test tools. It describes unit tests, tests across several modules, API route tests, and full end-to-end tests that follow user flows.

In plain words
What is it for?
Use it to test Medusa services, workflows, modules, API routes, and complete application flows.
Why use it?
It helps you choose the right test level and set up the required runners and mocks. This reduces confusion when testing commerce workflows and HTTP endpoints.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the medusa-commerce plugin — 19 skills, 1 agent shipped together

Good fit Use it to test Medusa services, workflows, modules, API routes, and complete application flows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/orcaqubits/agentic-commerce-skills-plugins/medusa-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add OrcaQubits/agentic-commerce-skills-plugins --skill medusa-testing
Clone the repo
git clone --depth 1 https://github.com/OrcaQubits/agentic-commerce-skills-plugins

Made for: Claude Code.

Or install medusa-commerce, the plugin that ships this one along with the rest of its 19 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for medusa-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/orcaqubits/agentic-commerce-skills-plugins/medusa-testing/github.svg)](https://agentmods.dev/skills/orcaqubits/agentic-commerce-skills-plugins/medusa-testing)
Your own site
<a href="https://agentmods.dev/skills/orcaqubits/agentic-commerce-skills-plugins/medusa-testing"><img src="https://agentmods.dev/badge/skills/orcaqubits/agentic-commerce-skills-plugins/medusa-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for medusa-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/orcaqubits/agentic-commerce-skills-plugins/medusa-testing"><img src="https://agentmods.dev/badge/skills/orcaqubits/agentic-commerce-skills-plugins/medusa-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,524 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01524
Opus 5 $0.00023 $0.00762
Sonnet 5 $0.00009 $0.00305
Haiku 4.5 $0.00005 $0.00152

Measured 2d ago against content hash 562dbc41b999, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-16, from the pricing page.

Security

Grade A, and why

medusa-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

medusa-commerce/skills/medusa-testing/SKILL.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Medusa v2 Testing

Before writing code

Fetch live docs:

  1. Web-search site:docs.medusajs.com testing for official testing guide and setup
  2. Web-search site:docs.medusajs.com medusaIntegrationTestRunner for integration test utilities
  3. Web-search site:docs.medusajs.com unit test module for module unit testing patterns
  4. Fetch https://docs.medusajs.com/learn/debugging-and-testing and review test runner configuration
  5. Web-search medusajs v2 jest test workflow 2026 for latest workflow testing patterns

Test Architecture

Test Pyramid

        ┌─────────┐
        │  E2E    │  API route tests (slow, high confidence)
        ├─────────┤
        │ Integr. │  Workflow + cross-module tests
        ├─────────┤
        │  Unit   │  Module service + utility tests (fast)
        └─────────┘

Test Types

Type Scope Runner Speed
Unit Single module service Jest Fast
Integration Workflows, cross-module medusaIntegrationTestRunner Medium
API Route HTTP endpoints medusaIntegrationTestRunner + supertest Slow
E2E Full user flows Playwright/Cypress (optional) Slowest

Jest Setup

// Skeleton: jest.config.ts for Medusa v2
// Fetch live docs for current recommended config
module.exports = {
  preset: "ts-jest",
  testEnvironment: "node",
  // Fetch live docs for moduleNameMapper and transform
}

Package Dependencies

Package Purpose
jest Test runner
ts-jest TypeScript support
@medusajs/test-utils Medusa test utilities
supertest HTTP assertion library

Fetch live docs for the current @medusajs/test-utils package exports and version compatibility.

Module Unit Tests

// Skeleton: module unit test
// Fetch live docs for module test setup
describe("ProductModuleService", () => {
  let service: IProductModuleService
  // Fetch live docs for beforeAll setup with test database
})

Read the full file on GitHub · 201 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 201 lines · 45 tokens per session scan A 562dbc41b999

Subscribe to this mod's changes

medusa-testing is a skill published in the GitHub repository OrcaQubits/agentic-commerce-skills-plugins (39 stars, last pushed 2d ago), licensed MIT. It adds 45 tokens to every session and 1,524 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-15.