Add skills
This commit is contained in:
parent
5adf626209
commit
5b7150d297
2 changed files with 43 additions and 0 deletions
18
skills/maintain-mutations/SKILL.md
Normal file
18
skills/maintain-mutations/SKILL.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Maintain mutations
|
||||
description: Trigger when asked to maintain mutations
|
||||
---
|
||||
|
||||
Start with:
|
||||
|
||||
```sh
|
||||
mutannot <path/to/test-project.fsproj> --validate
|
||||
```
|
||||
|
||||
Fix every reported error. Re-run `mutannot <path/to/test-project.fsproj> --validate` until it succeeds with no errors.
|
||||
|
||||
If you change mutations, you must run the changed mutations with:
|
||||
|
||||
```sh
|
||||
mutannot <path/to/test-project.fsproj> --run <mutation id 1> <mutation id 2> <...>
|
||||
```
|
||||
25
skills/write-mutations/SKILL.md
Normal file
25
skills/write-mutations/SKILL.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
name: Write mutations
|
||||
description: Trigger when asked to write mutations
|
||||
---
|
||||
|
||||
Annotate tests with one or more mutations (`MutationCase`s) that will cause the test to fail.
|
||||
|
||||
Example:
|
||||
|
||||
```fs
|
||||
[<Fact>]
|
||||
[<MutationCase("calc-operator-mixup", "Calculator/Calculator.fs", 4, "value + 1", "value - 1")>]
|
||||
member _.AddOne_increments() =
|
||||
Assert.Equal(42, Calculator.addOne 41)
|
||||
```
|
||||
|
||||
In this example,
|
||||
|
||||
* `calc-operator-mixup` is the mutation name,
|
||||
* `Calculator/Calculator.fs` is the path to the production code (relative to the repository root),
|
||||
* `4` is the number of the line to mutate,
|
||||
* `value + 1` is the string to find, and
|
||||
* `value - 1` is the string to replace it with.
|
||||
|
||||
Verify your work with `mutannot <path/to/test-project.fsproj> --run <mutation id 1> <mutation id 2> <...>`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue