Skip to content

Commit a89b1c2

Browse files
committed
added tests for custom toBeWithinTolerance matcher
1 parent b1cadb5 commit a89b1c2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/specs/matchHeight.spec.js

+9
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ describe('matchHeight', function() {
9696
});
9797

9898
it('has matched heights when byRow true', function(done) {
99+
// test custom toBeWithinTolerance matcher
100+
expect(-1.0001).not.toBeWithinTolerance(0);
101+
expect(-1).toBeWithinTolerance(0);
102+
expect(-0.1).toBeWithinTolerance(0);
103+
expect(0).toBeWithinTolerance(0);
104+
expect(0.1).toBeWithinTolerance(0);
105+
expect(1).toBeWithinTolerance(0);
106+
expect(1.0001).not.toBeWithinTolerance(0);
107+
99108
$('.simple-items, .image-items, .nested-items-parent, .nested-items,' +
100109
'.fixed-items, .inline-block-items, .inline-flex-items')
101110
.each(function() {

0 commit comments

Comments
 (0)