diff options
author | liabru <liabru@brm.io> | 2015-11-14 23:46:13 +0000 |
---|---|---|
committer | liabru <liabru@brm.io> | 2015-11-14 23:46:13 +0000 |
commit | 6cf52f0e59dbd9aa0a607af188e45c49983a44e4 (patch) | |
tree | b9cff02a9e623060554e0b498e085b8c790a6fb4 | |
parent | a72a2cf545ea088ebfc0ae93b12fd99daa75919c (diff) | |
download | jquery-match-height-6cf52f0e59dbd9aa0a607af188e45c49983a44e4.zip jquery-match-height-6cf52f0e59dbd9aa0a607af188e45c49983a44e4.tar.gz jquery-match-height-6cf52f0e59dbd9aa0a607af188e45c49983a44e4.tar.bz2 |
change tests to use jquery type checking functions
-rw-r--r-- | test/specs/matchHeight.spec.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/test/specs/matchHeight.spec.js b/test/specs/matchHeight.spec.js index 3148812..bbd2f94 100644 --- a/test/specs/matchHeight.spec.js +++ b/test/specs/matchHeight.spec.js @@ -31,14 +31,18 @@ describe('matchHeight', function() { it('has been defined', function(done) { var matchHeight = $.fn.matchHeight; - expect(typeof matchHeight).toBe('function'); - expect(testHelper.isArray(matchHeight._groups)).toBe(true); - expect(typeof matchHeight._throttle).toBe('number'); + expect($.isFunction(matchHeight)).toBe(true); + expect($.isArray(matchHeight._groups)).toBe(true); + expect($.isNumeric(matchHeight._throttle)).toBe(true); expect(typeof matchHeight._maintainScroll).toBe('boolean'); - expect(typeof matchHeight._rows).toBe('function'); - expect(typeof matchHeight._apply).toBe('function'); - expect(typeof matchHeight._applyDataApi).toBe('function'); - expect(typeof matchHeight._update).toBe('function'); + expect($.isFunction(matchHeight._rows)).toBe(true); + expect($.isFunction(matchHeight._apply)).toBe(true); + expect($.isFunction(matchHeight._applyDataApi)).toBe(true); + expect($.isFunction(matchHeight._update)).toBe(true); + expect($.isFunction(matchHeight._parse)).toBe(true); + expect($.isFunction(matchHeight._parseOptions)).toBe(true); + expect($.isFunction(matchHeight._getProperty)).toBe(true); + expect($.isFunction(matchHeight._setProperty)).toBe(true); done(); }); @@ -415,9 +419,6 @@ jasmine.getEnv().addReporter({ var testHelper = { isMediaQueriesSupported: typeof (window.matchMedia || window.msMatchMedia) !== 'undefined' || navigator.userAgent.indexOf('MSIE 9.0') >= 0, - isArray: function(obj) { - return Object.prototype.toString.call(obj) === '[object Array]'; - }, getCurrentBreakpoint: function() { if (testHelper.isMediaQueriesSupported) { var windowWidth = $(window).width(); |