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