Skip to content
This repository was archived by the owner on Nov 4, 2020. It is now read-only.
This repository was archived by the owner on Nov 4, 2020. It is now read-only.

.not is an antipattern #135

Open
Open
@btd

Description

@btd

.not modifier, while it looks very usefull from breaf view is clearly antipattern. I personally avoiding use it.
It produce additional class of possible problems like:

(10).should.not.be.a.Number()

There we see assertion object 10 to not be a Number, but assume you have more complex object you get from API response. So each time .not used need clearly rereview its usage.

Single usefull case for .not it is usage with .eql and .equal based assertions. When we know the actual object should not be equal to given in some way.

So probably it is worth to deprecate .not for everything by not .eql and .equal

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions