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 30, 2018
1 parent beb4c6b commit ac71bfd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions docs/_releases/v5.0.1/fakes.md
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
12 changes: 6 additions & 6 deletions docs/release-source/release/fakes.md
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 ac71bfd

Please sign in to comment.