Skip to content
Documentation
Command

/write-tests

Write tests for: $ARGUMENTS

From plugin
explore-claude-code
26212 skills8 agents12 commands
Install
$ npx -y skills add LukeRenton/explore-claude-code --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/write-tests

Context preview

What this command does when you run it.

Write tests for: $ARGUMENTS

Command definition

write-tests.md

Write tests for: $ARGUMENTS

Follow these conventions:

  • Use Jest with TypeScript
  • Use `describe` / `it` blocks (not `test()`)
  • Group by behaviour, not by method name
  • Mock external services (database, APIs) - never hit real endpoints
  • Include edge cases: empty input, null, boundary values, error paths
  • Use descriptive test names: `it('returns 404 when user does not exist')`

Structure:

describe('ComponentOrFunction', () => {
  describe('when condition', () => {
    it('should expected behaviour', () => {
      // Arrange → Act → Assert
    });
  });
});

After writing the tests, run `npm test` to verify they pass.

Ships withexplore-claude-code

Learn Claude Code by exploring it as it was designed - interactive IDE-style docs for commands, MCP, skills, CLAUDE.md and more.

Get the whole plugin, auto-invoked
Stats
262
Stars
0
Views
30
Forks
Active
Maintenance
JavaScript
Language
MIT
License
15d ago
Last commit
5mo ago
Created

Repo: LukeRenton/explore-claude-code