You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, if I combine the checks, it fails with the following error message:
it( 'rejectedWith problems', function ( done ) {
Promise.reject({ message: 'foo', value: 'bar' })
.should.be.rejectedWith('foo').and.eventually.have.property('value', 'bar')
.and.notify( done )
} )
TypeError: Cannot read property 'value' of undefined
at null.<anonymous> (node_modules/chai/lib/chai/core/assertions.js:865:14)
at ctx.(anonymous function) (node_modules/chai/lib/chai/utils/addMethod.js:40:25)
at node_modules/chai-as-promised/lib/chai-as-promised.js:304:26
at tryCatcher (node_modules/bluebird/js/release/util.js:11:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/release/promise.js:488:31)
at Promise._settlePromise (node_modules/bluebird/js/release/promise.js:545:18)
at Promise._settlePromise0 (node_modules/bluebird/js/release/promise.js:590:10)
at Promise._settlePromises (node_modules/bluebird/js/release/promise.js:673:18)
at Async._drainQueue (node_modules/bluebird/js/release/async.js:125:16)
at Async._drainQueues (node_modules/bluebird/js/release/async.js:135:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/release/async.js:16:14)
The text was updated successfully, but these errors were encountered:
Promise.should.eventually.be.rejectedWith('BadRequest').and.eventually.have.property('message').that.should.equal('Get requires an identifier(cid) or a query(skip,size,order).')
throws this
AssertionError: expected{Object(__flags,then)}toequal'Get requires an identifier(cid) or a query(skip,size,order).'
if I use your method of property('prop', 'value') I get the same error:
I have a problem with
rejectedWith()
assertion when I combine it with additional assertions. For example, the following works:as does this:
However, if I combine the checks, it fails with the following error message:
The text was updated successfully, but these errors were encountered: