Skip to content

feat(in-progress): Strapi REST API testing skills#6

Draft
innerdvations wants to merge 2 commits into
mainfrom
feat/in-progress-strapi-testing-skills
Draft

feat(in-progress): Strapi REST API testing skills#6
innerdvations wants to merge 2 commits into
mainfrom
feat/in-progress-strapi-testing-skills

Conversation

@innerdvations

Copy link
Copy Markdown

Summary

  • Adds strapi-testing — parent router skill that classifies test requests (REST API integration vs unit vs GraphQL vs out-of-scope) and explicitly excludes the Strapi monorepo.
  • Adds strapi-rest-api-testing — opinionated workflow for Strapi 5 application projects: Jest + Supertest + isolated test DB, with bootstrap gates and bundled templates.
  • References the official Strapi testing guide as the source of truth for the full TS-aware harness; ships supplemental templates for test DB config, JS harness, helpers, and safety checks.
  • First-time setup generates a GET /_health smoke test (tests/app.test.js) that must pass before writing endpoint tests.

What's included

Path Purpose
skills/in-progress/strapi-testing/ Router skill
skills/in-progress/strapi-rest-api-testing/SKILL.md Main workflow (bootstrap → smoke → feature test)
skills/in-progress/strapi-rest-api-testing/REFERENCE.md Test DB options, safety, permissions, troubleshooting
templates/ database.js, strapi.js, app.test.js, auth/permissions helpers
scripts/verify-test-env.js Pre-flight: NODE_ENV=test, test config exists, no prod DB names

Test plan

  • Dogfood on a fresh Strapi 5 JS app: bootstrap → yarn test tests/app.test.js green
  • Dogfood on a TS-config Strapi 5 app using official harness from docs
  • Dogfood writing one real Content API test (permissions + Document Service seed)
  • Review terminology and promote to skills/cms/ when stable

Add a parent strapi-testing router and strapi-rest-api-testing skill with
bootstrap templates, test DB safety checks, and _health smoke test gate.
Drop duplicated strapi.js, database.js, and package.json snippet templates.
Point bootstrap at docs.strapi.io/cms/testing; keep only skill-owned
smoke test, verify-test-env, and auth/permission helpers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant