Skip to content

Commit 0e2af2a

Browse files
committed
Add text about running just plugin tests and using TASTY_PATTERN
1 parent 87b4d95 commit 0e2af2a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/contributing/contributing.md

+15
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ Running just the wrapper tests
8181
$ cabal test wrapper-test
8282
```
8383

84+
Running just the tests for a specific plugin
85+
86+
```bash
87+
$ cabal test hls-<plugin-name>-plugin-tests
88+
# E.g.
89+
$ cabal test hls-refactor-plugin-tests
90+
```
91+
8492
Running a subset of tests
8593

8694
Tasty supports providing
@@ -99,6 +107,13 @@ An alternative, which only recompiles when tests (or dependencies) change:
99107
$ cabal run haskell-language-server:func-test -- -p "hlint enables"
100108
```
101109

110+
Yet another way to pass the pattern without recompilation is to use the `TASTY_PATTERN` environment variable.
111+
Run any of the `cabal test` commands above and set it to your pattern, e.g.:
112+
113+
```bash
114+
$ TASTY_PATTERN='-p hlint' cabal test func-test
115+
```
116+
102117
## Using HLS on HLS code
103118

104119
Refer to the [HLS project configuration guidelines](../configuration.md#configuring-your-project-build) as they also apply to the HLS project itself.

0 commit comments

Comments
 (0)