Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Assert an increase/decrease by an amount (delta) #339

@keithamus

Description

@keithamus

As per #333 and #330, we should be able to assert on the delta of a .changed/.increased/.decreased.

So far (in #333) the proposed syntaxes are:

foo.should.change('bar').by(5);
foo.should.increase('bar').by(5);
foo.should.decrease('bar').by(5);

or

foo.should.change('bar', 5);
foo.should.increase('bar', 5);
foo.should.decrease('bar', 5);

/cc @oveddan @cmpolis @logicalparadox

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