to be less than
- <number> [not] to be (less than|below) <number>
Asserts that a number is less than another number using the <
operator.
expect(2, 'to be less than', 3);expect(0, 'to be below', 1);
In case of a failing expectation you get the following output:
expect(2, 'to be less than', 2);
expected 2 to be less than 2
This assertion can be negated using the not
flag:
expect(2, 'not to be less than', 2);expect(1, 'not to be below', 0);
In case of a failing expectation you get the following output:
expect(2, 'not to be less than', 3);
expected 2 not to be less than 3