diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-04-01 15:46:23 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-04-01 15:47:01 +0200 |
| commit | cfc6d2d5b9ed9656165670e6ec262841aade3660 (patch) | |
| tree | bc495fc17377af70ae2b981d7fd93babad85559a /jsonmatch/diff_test.go | |
| parent | ca7ccbadbc19c2cb28f1b7edfcc845b9d7888adc (diff) | |
| download | go-gg-3f4b75ec1fbe9a1a018697da0c4b6f3ed98ee339.tar.gz | |
jsonmatch: add Irrelevantv1.6.0
Diffstat (limited to 'jsonmatch/diff_test.go')
| -rw-r--r-- | jsonmatch/diff_test.go | 8 |
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}, }, |
