21 lines
434 B
JavaScript
21 lines
434 B
JavaScript
getJasmineRequireObj().requireAsyncMatchers = function(jRequire, j$) {
|
|
'use strict';
|
|
|
|
const availableMatchers = [
|
|
'toBePending',
|
|
'toBeResolved',
|
|
'toBeRejected',
|
|
'toBeResolvedTo',
|
|
'toBeRejectedWith',
|
|
'toBeRejectedWithError',
|
|
'toBeRejectedWithMatching'
|
|
],
|
|
matchers = {};
|
|
|
|
for (const name of availableMatchers) {
|
|
matchers[name] = jRequire[name](j$);
|
|
}
|
|
|
|
return matchers;
|
|
};
|