Any thoughts on adding a containSubsetShallow or something? (FWIW, I would expect containSubset to be shallow by default, and containSubsetDeep to perform recursive subsetting, but that would be a breaking change).
I'm using chai-subset to assert props on React components, so that rather than doing something like this:
However, there is no need to perform recursive subset checking in this case; I would just want to use deepEqual instead on each of the matched props to ensure that their value is as expected. Has anyone proposed something like this, or would it make sense do have this option as part of this library?
Any thoughts on adding a
containSubsetShallow
or something? (FWIW, I would expectcontainSubset
to be shallow by default, andcontainSubsetDeep
to perform recursive subsetting, but that would be a breaking change).I'm using chai-subset to assert props on React components, so that rather than doing something like this:
I can just do:
However, there is no need to perform recursive subset checking in this case; I would just want to use
deepEqual
instead on each of the matched props to ensure that their value is as expected. Has anyone proposed something like this, or would it make sense do have this option as part of this library?