Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs about running tests for new contributors #4418

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions docs/contributing/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-name>-plugin-tests
# E.g.
$ cabal test hls-refactor-plugin-tests
```

Running a subset of tests

Tasty supports providing
Expand All @@ -92,11 +100,10 @@ $ cabal test func-test --test-option "-p hlint"
```

The above recompiles everything every time you use a different test option though.

An alternative, which only recompiles when tests (or dependencies) change:
An alternative, which only recompiles when tests (or dependencies) change is to pass the `TASTY_PATTERN` environment variable:

```bash
$ cabal run haskell-language-server:func-test -- -p "hlint enables"
$ TASTY_PATTERN='hlint' cabal test func-test
```

## Using HLS on HLS code
Expand Down
Loading