Skip to content

Conversation

@Lysander6
Copy link
Contributor

should.js' ok assertions must be called to work properly

this doesn't raise error:

describe.only('should.be.ok', function() {
    it('passes, but should not', function() {
        var x = false;
        x.should.be.ok;
    });
});

fails as it should:

describe.only('should.be.ok', function() {
    it('fails as it should', function() {
        var x = false;
        x.should.be.ok();
    });
});

@Lysander6
Copy link
Contributor Author

same goes for other assertions like .should.be.true, .should.be.a.Function, etc. which I fixed as well

Copy link
Member

@LinusU LinusU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch 👍

@dougwilson dougwilson self-assigned this Aug 5, 2017
@dougwilson
Copy link
Contributor

Ah, yea, probably a behavior change in some upgrade of should.

@dougwilson dougwilson closed this in 713d2ae Aug 6, 2017
@dougwilson dougwilson added the pr label Aug 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants