Skip to content

Commit

Permalink
Add opts to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
FredrikNoren committed Jan 18, 2015
1 parent 7133ca5 commit ea6dc65
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,16 @@ in [node-tap](https://github.com/isaacs/node-tap).
var test = require('tape')
```

## test(name, cb)
## test([name], [opts], cb)

Create a new test with an optional `name` string. `cb(t)` fires with the new
test object `t` once all preceeding tests have finished. Tests execute serially.
Create a new test with an optional `name` string and optional `opts` object.
`cb(t)` fires with the new test object `t` once all preceeding tests have
finished. Tests execute serially.

Available `opts` options are:
- opts.skip = true/false. See test.skip.
- opts.timeout = 500. Set a timeout for the test, after which it will fail.
See test.timeoutAfter.

If you forget to `t.plan()` out how many assertions you are going to run and you
don't call `t.end()` explicitly, your test will hang.
Expand Down

0 comments on commit ea6dc65

Please sign in to comment.