Pull async matchers out to their own functions
- Makes AsyncExpectation closer to Expectation
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
getJasmineRequireObj().requireAsyncMatchers = function(jRequire, j$) {
|
||||
var availableMatchers = [
|
||||
'toBeResolved',
|
||||
'toBeRejected',
|
||||
'toBeResolvedTo',
|
||||
'toBeRejectedWith'
|
||||
],
|
||||
matchers = {};
|
||||
|
||||
for (var i = 0; i < availableMatchers.length; i++) {
|
||||
var name = availableMatchers[i];
|
||||
matchers[name] = jRequire[name](j$);
|
||||
}
|
||||
|
||||
return matchers;
|
||||
};
|
||||
Reference in New Issue
Block a user