Skip to content
CLI Tools
Command

/add-test

Add a new test case to the test suite.

BOOST
From plugin
mgrep
4.4k6 skills6 commands
Install
> /plugin marketplace add mixedbread-ai/mgrep
> /plugin install mgrep@Mixedbread-Grep

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/add-test

Context preview

What this command does when you run it.

Add a new test case to the test suite.

Command definition

add-test.md

Add Test

Add a new test case to the test suite.

Arguments

  • `$ARGUMENTS` - Description of what to test (e.g., "search with empty query returns error")

Steps

1. Read the existing tests in `test/test.bats` to understand the current patterns.

2. Add a new test following this pattern:

   @test "$ARGUMENTS" {
     # Setup (if needed)

     # Execute
     run mgrep <command> <args>

     # Assert
     assert_success  # or assert_failure
     assert_output --partial "expected output"
   }

3. For long-running tests, add the tag:

   # bats test_tags=long-running
   @test "$ARGUMENTS" {
     ...
   }

4. Run the test to verify it works:

   bats test/test.bats --filter "$ARGUMENTS"

5. Ensure all tests still pass:

   pnpm test
Ships withmgrep

A calm, CLI-native way to semantically grep everything, like code, images, pdfs and more.

Get the whole plugin
Stats
4,414
Stars
176
Forks
Maintained
Maintenance
TypeScript
Language
Apache-2.0
License
5mo ago
Last commit
11mo ago
Created
1d ago
Added

Repo: mixedbread-ai/mgrep

Other commands on mgrep.