Skip to content

Instantly share code, notes, and snippets.

@magnars
Created June 19, 2013 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magnars/5813506 to your computer and use it in GitHub Desktop.
Save magnars/5813506 to your computer and use it in GitHub Desktop.
(function () {
"use strict";
buster.testCase("refute.calledWith fails badly in IE8", {
"it's just crazy dude": function () {
var spy = this.spy();
spy("'actual-value'");
refute.calledWith(spy, "'test-value'");
}
});
}());
@magnars
Copy link
Author

magnars commented Jun 19, 2013

Results in

[refute.calledWith] Expected function spy() {} not to be called with arguments 'test-value' spy('actual-value')

@magnars
Copy link
Author

magnars commented Jun 19, 2013

The same happens with assert.calledWith - in that it always passes.

@magnars
Copy link
Author

magnars commented Jun 19, 2013

All these pass in the example above:

assert.calledWith(spy);
assert.calledWith(spy, "'actual-value'");
assert.calledWith(spy, "'wrong-value'");
assert.calledWith(spy, "'wrong-value'", "more", "wrong", "stuff");
assert.calledWith(spy, Infinity);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment