Skip to content
Documentation
Command

/write-tests

Write tests for: $ARGUMENTS

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

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.

@lukerenton
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.

3295 skills8 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
329
Star history of LukeRenton/explore-claude-code on GitHub, a chart by star-history.com

Other commands on explore-claude-code.

btw

btw

Command

Ask a quick side question about your current work without adding to the conversation history. The question and answer appear in a…

compact

compact

Command

Compresses your conversation to reclaim context window space. Claude summarises the conversation so far, discards the original…

diff

diff

Command

Opens an interactive diff viewer showing uncommitted changes in your working directory and per-turn diffs from Claude's edits.

More commands from other plugins.