Skip to content

Commit

Permalink
Fix invalid documentation for fake.yields, fake.yieldsAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Apr 29, 2018
1 parent 9701332 commit 79cc3ec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/release-source/release/fakes.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,23 @@ If an `Error` is passed as the `value` argument, then that will be the value of

#### `sinon.fake.yields(callback[, value1, ..., valueN]);`

Creates a fake that calls the provided callback with the provided values.
`fake` expects the last argument to be a callback and will invoke it with the given arguments.

```js
var fake = sinon.fake.yields(console.log, 'hello world');
var fake = sinon.fake.yields('hello world');

fake();
fake(console.log);
// hello world
```

#### `sinon.fake.yieldsAsync(callback[, value1, ..., valueN]);`

Creates a fake that calls the provided callback asynchronously with the provided values.
`fake` expects the last argument to be a callback and will invoke it asynchronously with the given arguments.

```js
var fake = sinon.fake.yieldsAsync(console.log, 'hello world');
var fake = sinon.fake.yieldsAsync('hello world');

fake();
fake(console.log);
// hello world
```

Expand Down

0 comments on commit 79cc3ec

Please sign in to comment.