Skip to content

Commit

Permalink
docs: add helper commands to contributing.md (#25480)
Browse files Browse the repository at this point in the history
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
  • Loading branch information
3 people committed Oct 29, 2023
1 parent a57cdfd commit 4e912ae
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/contributing.md
Expand Up @@ -31,8 +31,41 @@ Before you start any Pull Request, it's recommended that you open a [discussion]
That way you can be sure that the maintainer(s) agree on what to change and how, and you can hopefully get a quick merge afterwards.
Also, let the maintainers know that you plan to work on a particular issue so that no one else starts any duplicate work.

### Tests

Pull Requests can only be merged once all status checks are green, which means `pnpm test` passes, and coverage is 100%.

Use these commands to help run your tests:

- To run a single test folder, specify the path

```bash
pnpm jest platform/gitlab
```

- To run against a single test file, specify down to the filename (suffix is not necessary)

```bash
pnpm jest platform/gitlab/index
```

- To run a single test batch, the `-t` value must be part of the `describe` value of the test batch

```bash
pnpm jest platform/gitlab/index -t "getJsonFile"
```

- To run a single test, the `-t` value must be part of the `it` value of the test batch

```bash
pnpm jest platform/gitlab/index -t "returns file content from given repo"
```

And some options:

- `--verbose=false` to avoid the test list
- `--collectCoverage=false` to avoid collecting coverage, faster for the part you need the test to pass

## Do not force push to your pull request branch

Please do not force push to your PR's branch after you have created your PR, as doing so forces us to review the whole PR again.
Expand Down

0 comments on commit 4e912ae

Please sign in to comment.