Skip to content

Commit

Permalink
docs: update mix mneme.watch moduledoc
Browse files Browse the repository at this point in the history
  • Loading branch information
zachallaun committed Jul 17, 2024
1 parent a54609f commit 32a70c0
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions lib/mix/tasks/mneme.watch.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,28 @@ defmodule Mix.Tasks.Mneme.Watch do
This task is similar to [`mix test.watch`](https://hex.pm/packages/mix_test_watch),
but updated to work with Mneme:
* interrupts Mneme prompts, saving out already-accepted changes
* tests aren't re-triggered when Mneme saves a test file after an
update
* interrupts Mneme prompts, saving already-accepted changes
* doesn't re-trigger when test files are updated by Mneme
This task accepts the same arguments as `mix test`. For instance:
## Setup
To ensure `mix mneme.watch` runs in the test environment, add a
`:preferred_cli_env` entry in `mix.exs`:
def project do
[
...
preferred_cli_env: [
"mneme.watch": :test
],
...
]
end
## Command line options
This task runs `mix test` under the hood and passes all CLI arguments
to it directly. For instance:
```sh
# only run tests tagged with `some_tag: true`
Expand All @@ -19,6 +36,8 @@ defmodule Mix.Tasks.Mneme.Watch do
# only run tests from one file
$ mix mneme.watch test/my_app/my_test.exs
```
See the `mix test` documentation for more information.
"""

use Mix.Task
Expand Down

0 comments on commit 32a70c0

Please sign in to comment.