Skip to content

Commit 447dea4

Browse files
NullMDRthymikee
NullMDR
authored andcommitted
Update index.d.ts with getSnapshotDiffSerializer() (#55)
getSnapshotDiffSerializer() is missing in index.d.ts
1 parent 5ab83f8 commit 447dea4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ declare module "snapshot-diff" {
2727
* make it available via `expect.extend({ toMatchDiffSnapshot })`.
2828
*/
2929
toMatchDiffSnapshot: (newObject: any) => void
30+
/**
31+
* By default Jest adds extra quotes around strings so it makes diff
32+
* snapshots of objects too noisy. To fix this – snapshot-diff comes
33+
* with custom serializer.
34+
*/
35+
getSnapshotDiffSerializer: () => jest.SnapshotSerializerPlugin
3036
}
3137
const diff: SnapshotDiff
3238
export = diff

0 commit comments

Comments
 (0)