Merge branch 'fix-save-args-by-value' of https://github.com/coyoteecd/jasmine
* Fixes cloning of Date objects in saveArgumentsByValue() * Merges #1955 from @coyoteecd * Fixes #1885
This commit is contained in:
@@ -54,6 +54,8 @@ getJasmineRequireObj().util = function(j$) {
|
||||
// All falsey values are either primitives, `null`, or `undefined.
|
||||
if (!argsAsArray[i] || str.match(primitives)) {
|
||||
clonedArgs.push(argsAsArray[i]);
|
||||
} else if (str === '[object Date]') {
|
||||
clonedArgs.push(new Date(argsAsArray[i].valueOf()));
|
||||
} else {
|
||||
clonedArgs.push(j$.util.clone(argsAsArray[i]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user