File tree Expand file tree Collapse file tree 1 file changed +22
-8
lines changed
Expand file tree Collapse file tree 1 file changed +22
-8
lines changed Original file line number Diff line number Diff line change 11/// <reference types="jest"/>
22
33type DiffOptions = {
4- expand ?: boolean ,
5- colors ?: boolean ,
6- contextLines ?: number ,
7- } ;
4+ expand ?: boolean
5+ colors ?: boolean
6+ contextLines ?: number
7+ }
88
99declare namespace jest {
1010 interface Matchers < R > {
11+ /**
12+ * Compare the difference between the actual in the `expect()`
13+ * vs the object inside `valueB` with some extra options.
14+ */
1115 toMatchDiffSnapshot ( valueB : any , options ?: DiffOptions ) : R
1216 }
1317}
1418
15- declare module 'snapshot-diff' {
16- function diff ( a : any , b : any , options ?: DiffOptions ) : string ;
17- namespace diff { }
18- export = diff ;
19+ declare module "snapshot-diff" {
20+ interface SnapshotDiff {
21+ /**
22+ * Compare the changes from a, to b
23+ */
24+ ( a : any , b : any , options ?: DiffOptions ) : string
25+ /**
26+ * Allows you to pull out toMatchDiffSnapshot and
27+ * make it available via `expect.extend({ toMatchDiffSnapshot })`.
28+ */
29+ toMatchDiffSnapshot : ( newObject : any ) => void
30+ }
31+ const diff : SnapshotDiff
32+ export = diff
1933}
You can’t perform that action at this time.
0 commit comments