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

fix broken 'ok' assertions in tests #3387

Closed

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