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

docs: Add a note about running a single test #1398

Merged
merged 2 commits into from
Jan 28, 2019
Merged

docs: Add a note about running a single test #1398

merged 2 commits into from
Jan 28, 2019

Conversation

RichardLitt
Copy link
Member

Useful for helping others write tests. Note: I didn't know how to run the ToC command, so a second commit was added. Can we add a way for us to run the tocbot without needing to have more commits? Or is it not important?

Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

@@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :)

CONTRIBUTING.md Outdated
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}, function(t) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I think we use arrow function in most tests now, maybe change it to (t) => {}?

@paulmelnikow
Copy link
Member

This is awesome, thanks!

I think if you npm run prettier that will fix the build.

Useful for helping others write tests.
@RichardLitt
Copy link
Member Author

Done. @TOC-bot still adding an empty commit, though.

@gr2m
Copy link
Member

gr2m commented Jan 28, 2019

I’ll squash it away

@gr2m gr2m merged commit 0305a83 into beta Jan 28, 2019
@gr2m gr2m deleted the feat/only-add branch January 28, 2019 16:19
@RichardLitt
Copy link
Member Author

Thanks, @gr2m!

@nockbot
Copy link
Collaborator

nockbot commented Feb 4, 2019

🎉 This PR is included in version 11.0.0-beta.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nockbot
Copy link
Collaborator

nockbot commented Aug 13, 2019

🎉 This PR is included in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants