File tree Expand file tree Collapse file tree 4 files changed +40
-1
lines changed Expand file tree Collapse file tree 4 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,11 @@ exports[`failed optional deps throws with sensible message on missing react-test
166
166
Cannot find module 'non-existent-module-for-testing' from '__tests__/snapshotDiff.test.js'"
167
167
` ;
168
168
169
+ exports [` no difference 1` ] = `
170
+ "Snapshot Diff:
171
+ Compared values have no visual difference."
172
+ ` ;
173
+
169
174
exports [` shows diff when comparing React fragments of varying length 1` ] = `
170
175
"Snapshot Diff:
171
176
- <FragmentComponent />
Original file line number Diff line number Diff line change @@ -267,3 +267,7 @@ describe('failed optional deps', () => {
267
267
) . toThrowErrorMatchingSnapshot ( ) ;
268
268
} ) ;
269
269
} ) ;
270
+
271
+ test ( 'no difference' , ( ) => {
272
+ expect ( snapshotDiff ( 'a' , 'a' ) ) . toMatchSnapshot ( ) ;
273
+ } ) ;
Original file line number Diff line number Diff line change 22
22
"jest" : " >=16"
23
23
},
24
24
"dependencies" : {
25
- "jest-diff" : " ^26.0.1 " ,
25
+ "jest-diff" : " ^26.1.0 " ,
26
26
"jest-snapshot" : " ^26.0.1" ,
27
27
"pretty-format" : " ^26.0.1"
28
28
},
Original file line number Diff line number Diff line change 1123
1123
" @types/yargs" " ^15.0.0"
1124
1124
chalk "^4.0.0"
1125
1125
1126
+ " @jest/types@^26.1.0 " :
1127
+ version "26.1.0"
1128
+ resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.1.0.tgz#f8afaaaeeb23b5cad49dd1f7779689941dcb6057"
1129
+ integrity sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==
1130
+ dependencies :
1131
+ " @types/istanbul-lib-coverage" " ^2.0.0"
1132
+ " @types/istanbul-reports" " ^1.1.1"
1133
+ " @types/yargs" " ^15.0.0"
1134
+ chalk "^4.0.0"
1135
+
1126
1136
" @sinonjs/commons@^1.7.0 " :
1127
1137
version "1.7.2"
1128
1138
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.2.tgz#505f55c74e0272b43f6c52d81946bed7058fc0e2"
@@ -3628,6 +3638,16 @@ jest-diff@^26.0.1:
3628
3638
jest-get-type "^26.0.0"
3629
3639
pretty-format "^26.0.1"
3630
3640
3641
+ jest-diff@^26.1.0 :
3642
+ version "26.1.0"
3643
+ resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.1.0.tgz#00a549bdc936c9691eb4dc25d1fbd78bf456abb2"
3644
+ integrity sha512-GZpIcom339y0OXznsEKjtkfKxNdg7bVbEofK8Q6MnevTIiR1jNhDWKhRX6X0SDXJlwn3dy59nZ1z55fLkAqPWg==
3645
+ dependencies :
3646
+ chalk "^4.0.0"
3647
+ diff-sequences "^26.0.0"
3648
+ jest-get-type "^26.0.0"
3649
+ pretty-format "^26.1.0"
3650
+
3631
3651
jest-docblock@^26.0.0 :
3632
3652
version "26.0.0"
3633
3653
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-26.0.0.tgz#3e2fa20899fc928cb13bd0ff68bd3711a36889b5"
@@ -4858,6 +4878,16 @@ pretty-format@^26.0.1:
4858
4878
ansi-styles "^4.0.0"
4859
4879
react-is "^16.12.0"
4860
4880
4881
+ pretty-format@^26.1.0 :
4882
+ version "26.1.0"
4883
+ resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.1.0.tgz#272b9cd1f1a924ab5d443dc224899d7a65cb96ec"
4884
+ integrity sha512-GmeO1PEYdM+non4BKCj+XsPJjFOJIPnsLewqhDVoqY1xo0yNmDas7tC2XwpMrRAHR3MaE2hPo37deX5OisJ2Wg==
4885
+ dependencies :
4886
+ " @jest/types" " ^26.1.0"
4887
+ ansi-regex "^5.0.0"
4888
+ ansi-styles "^4.0.0"
4889
+ react-is "^16.12.0"
4890
+
4861
4891
private@^0.1.6 :
4862
4892
version "0.1.8"
4863
4893
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
You can’t perform that action at this time.
0 commit comments