Skip to content

False positives and False negatives: Cannot add some language chainsΒ #675

@nis-thac

Description

@nis-thac

Related to #507 but not a duplicate, since I am using the latest version 1.1.36.
With all the examples, the expect gets marked with ESLint: Expect has an unknown modifier (vitest/valid-expect).

My guess is that some or all of the chai language chains are not treated properly.

// false positive
expect('hello').to.be.a('string').that.does.not.contain('world');
// false negative, vitest fails
// TypeError: expect(...).to.be is not a function
expect('hello').to.be('string').that.does.not.contain('world');


// false positive
expect('hello').not.to.be.an('array');


// true negative
expect('hello').to.not.contain('world');
// false positive
expect('hello').not.to.contain('world');

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