terminating-properties

Prevent calling to.be.ok and other assertion properties as functions

Rule Details

This rule looks for every assertion and reports them if they are used as a function The following patterns are considered warnings:

Correct

it("fails as expected", function() {
    expect(true).to.be.ok();
});
it("fails as expected", function() {
    expect(true).to.be.false();
});
it("fails as expected", function() {
    expect(true).to.exist();
});

Incorrect

it("works as expected", function() {
    expect(true).to.be.ok
});
it("works as expected", function() {
    expect(true).to.be.false
});
it("works as expected", function() {
    expect(true).to.exist
});