Chain-able Chai promised test case method
Instead of manually writing many test cases for a promise
return Promiseall shouldeventuallyhavedeep shouldeventuallyhavedeep shouldeventuallyhavedeep
you can write code that expresses what you really mean:
return should eventuallyhavedeep alsohavedeep alsohavedeep
In case .also
is same as .eventually
and .to.eventually
, after all
you must call .exec()
at the end of chain
Usage
Init test case
var chai = ;var chaiAsPromised = var alsoChain = chaichai var expect = chaiexpect; // OR var should = chai;
should
/expect
Interface
toeventually havedeep that also haveall
Promise) shouldeventually havedeep that also haveall
notify()
is overwrite and that method make assertions for all chain
promiseshould eventuallyhavedeep alsocontainall // this assertion is call for all promise in chain