*test-samurai.txt*  Run tests with a unified UX

INTRODUCTION                                                    *test-samurai*

Test Samurai provides a unified UX to run tests across languages
and frameworks, backed by an extensible runner architecture.


REQUIREMENTS                                               *test-samurai-req*

Neovim 0.11.4 or later is required.


SETUP                                                    *test-samurai-setup*

This plugin ships without built-in runners. Configure runner modules
in your setup so test commands and keymaps work properly:

>
  require("test-samurai").setup({
    runner_modules = {
      "my-runners.go",
      "my-runners.js",
    },
  })
<


COMMANDS                                            *test-samurai-commands*

:TSamNearest        Run the nearest test.
:TSamFile           Run all tests in the current file.
:TSamAll            Run all tests in the project.
:TSamLast           Re-run the last test command.
:TSamFailedOnly     Re-run only previously failed tests.
:TSamShowOutput     Reopen the Testing-Float output window.


DEFAULT KEYMAPS                                   *test-samurai-default-keys*

TSamNearest        <leader>tn
TSamFile           <leader>tf
TSamAll            <leader>ta
TSamLast           <leader>tl
TSamFailedOnly     <leader>te
TSamShowOutput     <leader>to


QUICK-HELP & FLOATS                                   *test-samurai-quickhelp*

In the Testing-Float, press ? to open the quick-help in the Detail-Float.

Additional keymaps:
Listing navigation:
  <leader>fn    [F]ind [N]ext failed test in listing (opens Detail-Float; works in Detail-Float)
  <leader>fp    [F]ind [P]revious failed test in listing (opens Detail-Float; works in Detail-Float)
  <leader>ff    [F]ind [F]irst list entry (opens Detail-Float; works in Detail-Float)
  <leader>o     Jump to test location (works in Detail-Float)
  <leader>qn    Close floats + jump to the first quickfix entry
Listing filters:
  <leader>sf    Filter listing to [ FAIL ] only
  <leader>ss    Filter listing to [ SKIP ] only
  <leader>sa    Show all listing entries (clear filter)
Listing actions:
  <leader>tt    Run the test under the cursor in the listing
  <leader>cb    breaks test-command onto multiple lines (clears search highlight)
  <leader>cj    joins test-command onto single line
Testing-Float:
  <leader>z     Toggle Detail-Float full width
  <C-l>         Focus Detail-Float (press l again for full)
  <C-h>         Focus Test-Listing-Float
  <esc><esc>    Close Testing-Float and restore cursor
  <C-c>         Close Detail-Float (when focused)

Notes:
  Active listing entry is highlighted while the Detail-Float is visible.
  Buffers are saved via :wall before every test run.


OUTPUT UI                                                     *test-samurai-ui*

Testing-Float: container floating window for output.
Test-Listing-Float: left subwindow listing test results.
Detail-Float: right subwindow showing detailed output for a test.

After running a test command, the UI opens in listing mode (only the
Test-Listing-Float is visible). Press <cr> on a [ FAIL ] entry to open
the Detail-Float with a 20/80 split. ANSI colors are translated only
inside the Detail-Float. If no output is captured for a test, the
Detail-Float shows "No output captured".

Summary lines (TOTAL/DURATION) are rendered in the listing output,
including after :TSamLast.


RUNNER ARCHITECTURE                                       *test-samurai-runners*

Runners are standalone Lua modules that implement the full interface.
See README.md for the required functions and runner guidelines.

==============================================================================
vim:ft=help
