to be less than or equal to
Asserts that a number is less than or equal to another number using
the <=
operator.
expect(3, 'to be less than or equal to', 3);
expect(3, 'to be <=', 4);
expect(4, '<=', 4);
In case of a failing expectation you get the following output:
expect(2, 'to be less than or equal to', 1);
expected 2 to be less than or equal to 1
This assertion can be negated using the not
flag:
expect(2, 'not to be less than or equal to', 1);
expect(4, 'not to be <=', 3);
In case of a failing expectation you get the following output:
expect(2, 'not to be less than or equal to', 2);
expected 2 not to be less than or equal to 2