Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Dec 26, 2018
1 parent 8446402 commit 0226228
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions documentation/assertions/object/to-have-a-value-satisfying.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Asserts that an object contains at least one value that satisfies a given
value, function or other assertion.
value, function (wrapped in `expect.it`) or other assertion.

Note that this assertion fails if passed an empty object as the subject.

Expand All @@ -13,9 +13,9 @@ expect(
expect(
{ foo: 0, bar: 1, baz: 2, qux: 3 },
'to have a value satisfying',
function(value, index) {
expect.it(function(value) {
expect(value, 'to be a number');
}
})
);

expect(
Expand Down
4 changes: 2 additions & 2 deletions documentation/assertions/object/to-have-keys-satisfying.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Aliases: `to be a map whose keys satisfy`,
`to be an object whose keys satisfy`, `to be a hash whose keys satisfy`.

```js
expect({ foo: 0, bar: 1, baz: 2, qux: 3 }, 'to have keys satisfying', function(
expect({ foo: 0, bar: 1, baz: 2, qux: 3 }, 'to have keys satisfying', expect.it(function(
key
) {
expect(key, 'to match', /^[a-z]{3}$/);
});
}));

expect(
{ foo: 0, bar: 1, baz: 2, qux: 3 },
Expand Down
4 changes: 2 additions & 2 deletions documentation/assertions/object/to-have-values-satisfying.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Aliases: `to be a map whose values satisfy`,
expect(
{ foo: 0, bar: 1, baz: 2, qux: 3 },
'to have values satisfying',
function(value, index) {
expect.it(function(value) {
expect(value, 'to be a number');
}
})
);

expect(
Expand Down

0 comments on commit 0226228

Please sign in to comment.