File tree 5 files changed +581
-22
lines changed
5 files changed +581
-22
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,15 @@ exports[`can colorize diff 1`] = `
15
15
[2m very[22m
16
16
[2m long[22m
17
17
[2m script[22m
18
- [2m [22m "
18
+ "
19
19
` ;
20
20
21
21
exports [` can expand diff 1` ] = `
22
22
"Snapshot Diff:
23
23
- First value
24
24
+ Second value
25
25
26
-
26
+
27
27
some
28
28
some
29
29
some
@@ -36,7 +36,7 @@ exports[`can expand diff 1`] = `
36
36
very
37
37
long
38
38
script
39
- "
39
+ "
40
40
` ;
41
41
42
42
exports [` can use contextLines on diff 1` ] = `
@@ -92,7 +92,7 @@ exports[`can use stablePatchmarks on diff 1`] = `
92
92
@very
93
93
@long
94
94
@script
95
- "
95
+ "
96
96
` ;
97
97
98
98
exports [` collapses diffs and strips ansi by default 1` ] = `
@@ -110,7 +110,7 @@ exports[`collapses diffs and strips ansi by default 1`] = `
110
110
very
111
111
long
112
112
script
113
- "
113
+ "
114
114
` ;
115
115
116
116
exports [` detects React components 1` ] = `
@@ -155,7 +155,7 @@ exports[`diffs short strings 1`] = `
155
155
- First value
156
156
+ Second value
157
157
158
-
158
+
159
159
- abcx
160
160
+ abcy
161
161
"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ exports[`proxies "colors" option(s) 1`] = `
15
15
[2m very[22m
16
16
[2m long[22m
17
17
[2m script[22m
18
- [2m [22m "
18
+ "
19
19
` ;
20
20
21
21
exports [` proxies "contextLines" option(s) 1` ] = `
@@ -32,7 +32,7 @@ exports[`proxies "expand" option(s) 1`] = `
32
32
- First value
33
33
+ Second value
34
34
35
-
35
+
36
36
some
37
37
some
38
38
some
@@ -45,7 +45,7 @@ exports[`proxies "expand" option(s) 1`] = `
45
45
very
46
46
long
47
47
script
48
- "
48
+ "
49
49
` ;
50
50
51
51
exports [` works with custom name: slim 1` ] = `
@@ -63,7 +63,7 @@ exports[`works with custom name: slim 1`] = `
63
63
very
64
64
long
65
65
script
66
- "
66
+ "
67
67
` ;
68
68
69
69
exports [` works with default options 1` ] = `
@@ -81,5 +81,5 @@ exports[`works with default options 1`] = `
81
81
very
82
82
long
83
83
script
84
- "
84
+ "
85
85
` ;
Original file line number Diff line number Diff line change 19
19
"jest" : " >=16"
20
20
},
21
21
"dependencies" : {
22
- "jest-diff" : " ^24.0 .0" ,
23
- "jest-snapshot" : " ^24.0 .0" ,
24
- "pretty-format" : " ^24.0 .0" ,
22
+ "jest-diff" : " ^25.1 .0" ,
23
+ "jest-snapshot" : " ^25.1 .0" ,
24
+ "pretty-format" : " ^25.1 .0" ,
25
25
"strip-ansi" : " ^6.0.0"
26
26
},
27
27
"devDependencies" : {
Original file line number Diff line number Diff line change 2
2
3
3
'use strict' ;
4
4
5
- const diff = require ( 'jest-diff' ) ;
5
+ const diff = require ( 'jest-diff' ) . default ;
6
6
const snapshot = require ( 'jest-snapshot' ) ;
7
7
const reactSerializer = require ( './react-serializer' ) ;
8
8
@@ -84,7 +84,7 @@ function toMatchDiffSnapshot(
84
84
) {
85
85
const difference = snapshotDiff ( valueA , valueB , options ) ;
86
86
87
- return snapshot . toMatchSnapshot . call ( this , difference , testName ) ;
87
+ return snapshot . toMatchSnapshot . call ( this , difference , testName || '' ) ;
88
88
}
89
89
90
90
function getSnapshotDiffSerializer ( ) {
You can’t perform that action at this time.
0 commit comments