diff --git a/docs/contributing/contributing.md b/docs/contributing/contributing.md index c38ce0421d..049c7a7b9f 100644 --- a/docs/contributing/contributing.md +++ b/docs/contributing/contributing.md @@ -81,6 +81,14 @@ Running just the wrapper tests $ cabal test wrapper-test ``` +Running just the tests for a specific plugin + +```bash +$ cabal test hls--plugin-tests +# E.g. +$ cabal test hls-refactor-plugin-tests +``` + Running a subset of tests Tasty supports providing @@ -99,6 +107,13 @@ An alternative, which only recompiles when tests (or dependencies) change: $ cabal run haskell-language-server:func-test -- -p "hlint enables" ``` +Yet another way to pass the pattern without recompilation is to use the `TASTY_PATTERN` environment variable. +Run any of the `cabal test` commands above and set it to your pattern, e.g.: + +```bash +$ TASTY_PATTERN='-p hlint' cabal test func-test +``` + ## Using HLS on HLS code Refer to the [HLS project configuration guidelines](../configuration.md#configuring-your-project-build) as they also apply to the HLS project itself.