Skip to content

Using should as function issue #13

@killmenot

Description

@killmenot

Hi,

When I use should the following way:

var sinon = require('sinon');
var should = require('should');
require('./should-sinon');

var callback = sinon.spy();
callback.should.not.be.called();

All works as expected. However, when I use should as function, the adapter works not as expected

var sinon = require('sinon');
var should = require('should/as-function');
require('./should-sinon');

var callback = sinon.spy();
should(callback)not.be.called(); // throws callback.called is not a function

The problem is that adapter use should by default here https://github.com/shouldjs/sinon/blob/master/should-sinon.js#L1-L9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions