aboutsummaryrefslogtreecommitdiff
path: root/jsonmatch/diff_test.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2026-04-01 15:46:23 +0200
committerStefan Majewsky <majewsky@gmx.net>2026-04-01 15:47:01 +0200
commitcfc6d2d5b9ed9656165670e6ec262841aade3660 (patch)
treebc495fc17377af70ae2b981d7fd93babad85559a /jsonmatch/diff_test.go
parentca7ccbadbc19c2cb28f1b7edfcc845b9d7888adc (diff)
downloadgo-gg-cfc6d2d5b9ed9656165670e6ec262841aade3660.tar.gz
jsonmatch: add Irrelevantv1.6.0
Diffstat (limited to 'jsonmatch/diff_test.go')
-rw-r--r--jsonmatch/diff_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/jsonmatch/diff_test.go b/jsonmatch/diff_test.go
index a59d304..74a976f 100644
--- a/jsonmatch/diff_test.go
+++ b/jsonmatch/diff_test.go
@@ -61,11 +61,13 @@ func TestCanonicalizesActualPayload(t *testing.T) {
}
AssertEqual(t, match.DiffAgainst(message), nil)
- // changing the type of `data` to map[string]any does not change anything at all;
- // using the jsonmatch.Object name on this level is mostly syntactic sugar to communicate intent
+ // changing the type of `data` to map[string]any and of `data.qux` to []any does not change anything at all;
+ // using the jsonmatch.Object and jsonmatch.Array names on this level is mostly syntactic sugar to communicate intent;
+ //
+ // also, this tests that jsonmatch.Irrelevant() works as expected
match = jsonmatch.Object{
"data": map[string]any{
- "foo": 42,
+ "foo": jsonmatch.Irrelevant(),
"bar": "hello world",
"qux": []any{5, nil, 15},
},