sinon-test
sinon-test copied to clipboard
utils.isSinon always fails with sinon@3 as getConfig does not exist anymore
exports.isSinon = function (obj) {
return !!obj && typeof obj === "object" &&
typeof obj.getConfig === "function" &&
!!obj.sandbox && typeof obj.sandbox === "object" && typeof obj.sandbox.create === "function";
};
returns always false since this PR from sinon #1506
Maybe we should delete this assertion typeof obj.getConfig === "function" or find another property.
Let's just fix this today - must be a very easy fix. Basically, all we need to know is if we are able to create sandboxes. I would simply check for the factory functions that are added in Sinon's 1515 PR - in addition to the old sinon.sandbox.create (which would make it backwards compatible).
I can look into this.
Released as sinon-test 2.1