npx skills add ...
npx skills add getsentry/junior --skill slack-msw-tests
npx skills add getsentry/junior --skill slack-msw-tests
Author Slack HTTP integration tests using the repository MSW harness and fixture factories. Use when asked to add a Slack integration test, mock Slack API calls with MSW, test Slack action HTTP behavior, or assert Slack request payloads in tests.
Write new Slack HTTP integration tests in tests/ using the shared MSW harness and Slack fixtures.
Use this skill only when the test validates outbound Slack HTTP behavior, including:
src/chat/slack-actions/*files.getUploadURLExternal + files.slack.com/upload/* + files.completeUploadExternal)src/chat/slack-user.tsIf the target test is pure business logic with no Slack HTTP contract assertions, use a normal unit test and skip this skill.
| Need | Read |
|---|---|
| End-to-end authoring workflow | ${CLAUDE_SKILL_ROOT}/references/test-authoring-playbook.md |
| Endpoint and fixture mapping | ${CLAUDE_SKILL_ROOT}/references/endpoint-fixture-matrix.md |
| Existing bad patterns to avoid | ${CLAUDE_SKILL_ROOT}/references/anti-patterns-and-fixes.md |
tests/ with *.test.ts naming.tests/msw/handlers/slack-api.ts.tests/fixtures/slack/factories/api.ts.Required Slack assistant-thread matrix when the change touches status/title/progress:
thread_ts: assert assistant.threads.* uses that live thread context.thread_ts: assert status/title calls use the live message ts for the first thread reply rather than persisted state.thread_ts: assert status/title calls are skipped rather than synthesized from persisted state or generic message ts.thread_ts.Do not create local MSW servers in test files. Global lifecycle is already configured via tests/msw/setup.ts.
Run:
pnpm test -- <target-test-files>pnpm typecheckRun this sanity check for forbidden patterns:
rg -n "vi\\.mock\\(\\s*['\"]@slack/web-api['\"]|vi\\.mock\\(\\s*['\"]@/chat/slack-actions/client['\"]" testsvi.mock("@slack/web-api") for Slack integration tests.vi.mock("@/chat/slack-actions/client") for Slack HTTP behavior tests.globalThis.fetch for Slack hosts in these tests.