node.js - Node mocha array should contain an element -
i want simple assertion of like
knownarray.should.include('known value')
the array correct, can't figure out proper assertion use check whether array has value (the index doesn't matter). tried should.contain
both of these throw error object #<assertion> has no method 'contain'
(or 'include'
)
how can check array contains element using should
?
should.js has containeql method. in case:
knownarray.should.containeql('known value');
the methods include
, includes
, contain
find in chai.js.
Comments
Post a Comment