webcompere / model-assert

Assertions for data models
MIT License
28 stars 3 forks source link

Is EqualTo to allow “containsAll” mode for array and object #21

Closed ashleyfrieze closed 3 years ago

ashleyfrieze commented 3 years ago

Partially fixed by #29

ashleyfrieze commented 3 years ago

Contains, rather than equals is available on array, but not object.

E.g.

{ "a": "someA", "b": "someB"}

// does contain

{ "a": "someA" }

maybe:

assertJson(actual)
   .where().at("/").objectContains()
   .isEqualTo(expected);