to be fulfilled with
- <Promise> to be fulfilled with <any>
Asserts that a promise is fulfilled with a specific value:
var promiseThatWillBeFulfilledWithAValue = new Promise(function(
'to be fulfilled with',
The expected value will be matched against the value with
to satisfy semantics, so you can pass any of the
values supported by
return expect(Promise.resolve('abc'), 'to be fulfilled with', /b/);
You get a nice diff if the assertion fails:
return expect(Promise.resolve('abc'), 'to be fulfilled with', 'def');
expected Promise to be fulfilled with 'def'
expected 'abc' to equal 'def'