Skip to content

Commit

Permalink
docs: Add a note about running a single test (#1398)
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLitt authored and gr2m committed Sep 4, 2019
1 parent 62351ff commit bc01008
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 15,7 @@ Please note that this project is released with a [Contributor Code of Conduct](.
- [Commit Message conventions](#commit-message-conventions)
- [Generate README TOC](#generate-readme-toc)
- [Running tests](#running-tests)
- [Running only a single test](#running-only-a-single-test)
- [Release Process](#release-process)
- [GitHub Apps](#github-apps)
- [Becoming a maintainer](#becoming-a-maintainer)
Expand Down Expand Up @@ -97,6 98,22 @@ All of the tests work offline. None of them should hit the network.
$ npm test
```

### Running only a single test

When you're writing a test for a specific purpose, it may be useful to only run that test. In order to do this, you can pass a `only` option as the second argument to the [`tap`](https://www.node-tap.org/) testrunner. For instance in `tests/example.js`, like so:

```js
test('description', { only: true }, t => {
// ...
})
```

And then:

```sh
$ tap --only tests/example_file.js
```

## Release Process

All of our releases are automated using [semantic-release](https://github.com/semantic-release/semantic-release). The commit messages pushed to the master branch trigger new releases. Semantic-release requires that commits follow certain conventions, [described above](#commit-message-conventions). semantic-release creates a GitHub release, adds release notes and publishes the new version to npm. This is why we do not store release notes in the [`CHANGELOG`](CHANGELOG.md) file - they're already on GitHub.
Expand Down

0 comments on commit bc01008

Please sign in to comment.