Fix spy arity stuff to work in IE8

This commit is contained in:
Gregg Van Hove
2016-09-28 11:49:07 -07:00
parent 63cc6687ff
commit 0d1a9a72d9
3 changed files with 6 additions and 4 deletions

View File

@@ -8,7 +8,8 @@ getJasmineRequireObj().Spy = function (j$) {
More explanation here (look at comments): http://www.bennadel.com/blog/1909-javascript-function-constructor-does-not-create-a-closure.htm
*/
/* jshint evil: true */
wrapper = eval('(function (' + args + ') { return spy.apply(this, Array.prototype.slice.call(arguments)); })'),
wrapper = eval('(0, function (' + args + ') { return spy.apply(this, Array.prototype.slice.call(arguments)); })'),
/* jshint evil: false */
spyStrategy = new j$.SpyStrategy({
name: name,
fn: originalFn,