@@ -167,6 +167,25 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
return env.expect(actual);
|
||||
},
|
||||
|
||||
/**
|
||||
* Create an asynchronous expectation for a spec. Note that the matchers
|
||||
* that are provided by an asynchronous expectation all return promises
|
||||
* which must be either returned from the spec or waited for using `await`
|
||||
* in order for Jasmine to associate them with the correct spec.
|
||||
* @name expectAsync
|
||||
* @function
|
||||
* @global
|
||||
* @param {Object} actual - Actual computed value to test expectations against.
|
||||
* @return {async-matchers}
|
||||
* @example
|
||||
* await expectAsync(somePromise).toBeResolved();
|
||||
* @example
|
||||
* return expectAsync(somePromise).toBeResolved();
|
||||
*/
|
||||
expectAsync: function(actual) {
|
||||
return env.expectAsync(actual);
|
||||
},
|
||||
|
||||
/**
|
||||
* Mark a spec as pending, expectation results will be ignored.
|
||||
* @name pending
|
||||
|
||||
Reference in New Issue
Block a user