We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 066e2d4 commit f644bacCopy full SHA for f644bac
internal/jsondiff/jsondiff_test.go
@@ -317,6 +317,36 @@ func TestDiff(t *testing.T) {
317
- 2,
318
- 3
319
- ]
320
+ }`,
321
+ wantKind: jsondiff.NoMatch,
322
+ },
323
+ {
324
+ name: "object containing array containing object equal",
325
+ a: `{"a": [1, {"b": 2}, 3]}`,
326
+ b: `{"a": [1, {"b": 2}, 3]}`,
327
+ wantDiff: ` {
328
+ "a": [
329
+ 1,
330
331
+ "b": 2
332
333
+ 3
334
+ ]
335
336
+ wantKind: jsondiff.Match,
337
338
339
+ name: "object containing array containing object not equal",
340
341
+ b: `{"a": [1, {"b": 4}, 3]}`,
342
343
344
345
346
+~ "b": 4 => 2
347
348
349
350
}`,
351
wantKind: jsondiff.NoMatch,
352
},
0 commit comments