Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

A `Function#bind` usage slipped by.

Compare with GH-7. Should help with GH-8.
  • Loading branch information...
commit 6e582e9bb14ac5c3c75fcd1d9465cd3c44ad944f 1 parent eeb0c1a
@domenic authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/sinon-chai.js
View
5 lib/sinon-chai.js
@@ -56,7 +56,10 @@
function getMessages(spy, action, nonNegatedSuffix, always, args) {
var verbPhrase = always ? "always have " : "have ";
nonNegatedSuffix = nonNegatedSuffix || "";
- var printfArray = Function.prototype.apply.bind(spy.printf, spy);
+
+ function printfArray(array) {
+ return spy.printf.apply(spy, array);
+ }
return {
affirmative: printfArray(["expected %n to " + verbPhrase + action + nonNegatedSuffix].concat(args)),
Please sign in to comment.
Something went wrong with that request. Please try again.