3 ms·
It might not be the general solution you're looking for, but idiomatic Jest does the job for me. expect(width).toBeGreaterThan(0); expect(x+width).toBeLessT
by dalmo3 4y ago
It might not be the general solution you're looking for, but idiomatic Jest does the job for me.
expect(width).toBeGreaterThan(0); expect(x+width).toBeLessThan(screenWidth);
When an assertion fails it will tell you: "Expected: X; Received: Y"