From a89b1c24e6b29c508bd9802b00f1bd0cc1449077 Mon Sep 17 00:00:00 2001 From: liabru Date: Sun, 8 Nov 2015 17:41:45 +0000 Subject: [PATCH] added tests for custom toBeWithinTolerance matcher --- test/specs/matchHeight.spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) 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() {