to be less than or equal to

  • <string> [not] to be less than or equal to <string>

Asserts that a string is less than or equal to another string using the <= operator.

expect('b', 'to be less than or equal to', 'b');

In case of a failing expectation you get the following output:

expect('b', 'to be less than or equal to', 'a');
expected 'b' to be less than or equal to 'a'

This assertion can be negated using the not flag:

expect('b', 'not to be less than or equal to', 'a');

In case of a failing expectation you get the following output:

expect('a', 'not to be less than or equal to', 'a');
expected 'a' not to be less than or equal to 'a'