Closed rajnathani closed 10 years ago
Hi. Thanks for Pr, but i will not accept it for 2 reasons:
.containEql
and .containDeep
:> ['pepperoni', 'tomatoes', 'onion'].should.containEql('tomatoes')
{ obj:
[ 'pepperoni',
'tomatoes',
'onion' ],
params: { operator: 'to contain \'tomatoes\'' },
negate: false }
> ['pepperoni', 'tomatoes', 'onion'].should.containDeep(['tomatoes'])
{ obj:
[ 'pepperoni',
'tomatoes',
'onion' ],
params: { operator: 'to contain [ \'tomatoes\' ]' },
negate: false }
> ['pepperoni', 'tomatoes', 'onion'].should.containDeep(['tomatoes', 1])
AssertionError: expected [ 'pepperoni', 'tomatoes', 'onion' ] to contain [ 'tomatoes', 1 ]
True. Lesser intuitive syntax, but as long as the core of the library is minimalistic, it sounds fair.
New BDD assertions:
supersetOf
subsetOf