summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliabru <liabru@brm.io>2015-11-08 17:41:45 +0000
committerliabru <liabru@brm.io>2015-11-08 17:41:45 +0000
commita89b1c24e6b29c508bd9802b00f1bd0cc1449077 (patch)
tree78a240dc37758274286606f4d74da36e91ced6fe
parentb1cadb589d3c22071d9e89887510d646036fcc5a (diff)
downloadjquery-match-height-a89b1c24e6b29c508bd9802b00f1bd0cc1449077.zip
jquery-match-height-a89b1c24e6b29c508bd9802b00f1bd0cc1449077.tar.gz
jquery-match-height-a89b1c24e6b29c508bd9802b00f1bd0cc1449077.tar.bz2
added tests for custom toBeWithinTolerance matcher
-rw-r--r--test/specs/matchHeight.spec.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/specs/matchHeight.spec.js b/test/specs/matchHeight.spec.js
index af63520..edbe575 100644
--- a/test/specs/matchHeight.spec.js
+++ b/test/specs/matchHeight.spec.js
@@ -96,6 +96,15 @@ describe('matchHeight', function() {
});
it('has matched heights when byRow true', function(done) {
+ // test custom toBeWithinTolerance matcher
+ expect(-1.0001).not.toBeWithinTolerance(0);
+ expect(-1).toBeWithinTolerance(0);
+ expect(-0.1).toBeWithinTolerance(0);
+ expect(0).toBeWithinTolerance(0);
+ expect(0.1).toBeWithinTolerance(0);
+ expect(1).toBeWithinTolerance(0);
+ expect(1.0001).not.toBeWithinTolerance(0);
+
$('.simple-items, .image-items, .nested-items-parent, .nested-items,' +
'.fixed-items, .inline-block-items, .inline-flex-items')
.each(function() {