Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils.isSinon always fails with sinon@3 as getConfig does not exist anymore #77

Closed
FlorentD opened this issue Aug 7, 2017 · 2 comments

Comments

@FlorentD
Copy link

FlorentD commented Aug 7, 2017

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.

@FlorentD FlorentD mentioned this issue Aug 7, 2017
@fatso83
Copy link
Contributor

fatso83 commented Aug 7, 2017

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.

@fatso83
Copy link
Contributor

fatso83 commented Aug 8, 2017

Released as sinon-test 2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants