Skip to content

Commit

Permalink
docs: Update incorrect implementation of custom inline snapshot match…
Browse files Browse the repository at this point in the history
…er (#10889)
  • Loading branch information
eps1lon committed Dec 2, 2020
1 parent 3d3176c commit 0ef65eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ It's also possible to create custom matchers for inline snapshots, the snapshots
const {toMatchInlineSnapshot} = require('jest-snapshot');

expect.extend({
toMatchTrimmedInlineSnapshot(received) {
return toMatchInlineSnapshot.call(this, received.substring(0, 10));
toMatchTrimmedInlineSnapshot(received, ...rest) {
return toMatchInlineSnapshot.call(this, received.substring(0, 10), ...rest);
},
});

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-25.x/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ It's also possible to create custom matchers for inline snapshots, the snapshots
const {toMatchInlineSnapshot} = require('jest-snapshot');

expect.extend({
toMatchTrimmedInlineSnapshot(received) {
return toMatchInlineSnapshot.call(this, received.substring(0, 10));
toMatchTrimmedInlineSnapshot(received, ...rest) {
return toMatchInlineSnapshot.call(this, received.substring(0, 10), ...rest);
},
});

Expand Down

0 comments on commit 0ef65eb

Please sign in to comment.