Skip to content

Commit

Permalink
fix planned assertion docs - fixes #140
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 6, 2015
1 parent 68a51fb commit 4f5597d
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ test(function name(t) {

### Planned assertions

Planned assertions are useful for being able to assert that all async actions happened and catch bugs where too many assertions happen. It also comes with the benefit of not having to manually end the test.
Planned assertions are useful for being able to assert that all async actions happened. It also comes with the benefit of not having to manually end the test.

This will result in a passed test:

Expand All @@ -162,20 +162,6 @@ test(t => {
});
```

And this will result in an error because the code called more assertions than planned:

```js
test(t => {
t.plan(1);

t.pass();

setTimeout(() => {
t.pass();
}, 100);
});
```

### Serial test execution

While concurrency is awesome, there are some things that can't be done concurrently. In these rare cases, you can call `test.serial`, which will force those tests to run serially before the concurrent ones.
Expand Down

0 comments on commit 4f5597d

Please sign in to comment.