Open
Description
I ran the following test just now, which passed:
assert_json_include!(actual: &serialized, expected: serde_json::json!({
"x": [0],
"y": [1, 3],
}))
Then I changed it to
assert_json_include!(actual: &serialized, expected: serde_json::json!({
"x": [0, 2],
"y": [1, 3],
}))
which also passed.
I think what's going on is that the Inclusive
compare mode is being passed recursively, instead of only for the outer object. That's very non-intuitive for me, I'd expect it to only be for the keys and not the inner values. Would it be possible to add a new mode that does a shallow inclusive compare instead of a deep inclusive compare?
Metadata
Metadata
Assignees
Labels
No labels