Manage spys/matchers/custom equalities for beforeAll
- Refactor expectations to take list of matchers - Add spyRegistry to manage runnables' spies - Add clone util [#66789174]
This commit is contained in:
parent
52026fb0f7
commit
752a36d3ff
@@ -30,5 +30,20 @@ getJasmineRequireObj().util = function() {
|
||||
return obj === void 0;
|
||||
};
|
||||
|
||||
util.clone = function(obj) {
|
||||
if (Object.prototype.toString.apply(obj) === "[object Array]") {
|
||||
return obj.slice();
|
||||
}
|
||||
|
||||
var cloned = {};
|
||||
for (var prop in obj) {
|
||||
if (obj.hasOwnProperty(prop)) {
|
||||
cloned[prop] = obj[prop];
|
||||
}
|
||||
}
|
||||
|
||||
return cloned;
|
||||
}
|
||||
|
||||
return util;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user