Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
docs: improve api documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
clebert committed Apr 2, 2017
1 parent d75d0eb commit 0a456d6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,20 +228,24 @@ test('foo', async t => {

Type definition: **`fail(message: string, cause: Error): void`**

Example TAP output: `not ok 1 - bar (cause: baz)`

Example usage:

```ts
const {test} = require('cybernaut');

test('foo', async t => {
t.fail('bar', new Error('baz')); // Throws a new error 'Error: bar (cause: baz)'
t.fail('bar', new Error('baz')); // Throws a new error
});
```

#### `pass`

Type definition: **`pass(message: string): void`**

Example TAP output: `ok 1 - bar`

Example usage:

```ts
Expand Down

0 comments on commit 0a456d6

Please sign in to comment.