Commit 5872288
Fixes #100
When a key in the `actual` results in a noop and its key index in the `expected`
is less than its index in the `actual`, the diff would display a `delete` for
this key along with a noop. For instance, in the diff below we have
`- profile_background_tile: false,` and ` profile_background_tile: false`.
```
Differing hashes.
Expected: { created_at: "Tue Jan 13 19:28:24 +0000 2009", favourites_count: 38, geo_enabled: false, verified: true, media_count: 51044, statuses_count: 273860, contributors_enabled: false, profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png", profile_background_color: "FFF1E0", profile_background_tile: false, profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg", listed_count: 37009, profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592" }
Actual: { listed_count: 37009, created_at: "Tue Jan 13 19:28:24 +0000 2009", favourites_count: 38, utc_offset: nil, statuses_count: 273860, media_count: 51044, contributors_enabled: false, is_translator: false, is_translation_enabled: false, profile_background_color: "FFF1E0", profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png", profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592", profile_background_tile: false }
Diff:
{
listed_count: 37009,
created_at: "Tue Jan 13 19:28:24 +0000 2009",
favourites_count: 38,
- geo_enabled: false,
- verified: true,
+ utc_offset: nil,
statuses_count: 273860,
media_count: 51044,
contributors_enabled: false,
+ is_translator: false,
+ is_translation_enabled: false,
profile_background_color: "FFF1E0",
profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png",
- profile_background_tile: false,
- profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592",
profile_background_tile: false
}
```1 parent 2bce2b1 commit 5872288
File tree
2 files changed
+5
-5
lines changed- lib/super_diff/operation_tree_builders
- spec/unit/equality_matchers
2 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1166 | 1166 | | |
1167 | 1167 | | |
1168 | 1168 | | |
1169 | | - | |
1170 | 1169 | | |
| 1170 | + | |
1171 | 1171 | | |
1172 | 1172 | | |
1173 | 1173 | | |
| |||
1177 | 1177 | | |
1178 | 1178 | | |
1179 | 1179 | | |
1180 | | - | |
| 1180 | + | |
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
| |||
1199 | 1199 | | |
1200 | 1200 | | |
1201 | 1201 | | |
1202 | | - | |
1203 | 1202 | | |
1204 | | - | |
| 1203 | + | |
| 1204 | + | |
1205 | 1205 | | |
1206 | 1206 | | |
1207 | 1207 | | |
| |||
0 commit comments