Sha256: 8f4a89a943c4df1896e3e73672ae8fa6844084d5c98a7ef27b2c2e22fa28e549

Contents?: true

Size: 1.5 KB

Versions: 62

Compression:

Stored size: 1.5 KB

Contents

(function () {
    'use strict';

    describe('WORKAREA.breakPoints', function () {
        describe('currentMatches', function () {
            it('returns an array', function () {
                expect(WORKAREA.breakPoints.currentMatches).to.be.instanceof(Array);
            });
        });

        describe('currentlyLessThan', function () {
            var config = WORKAREA.config.storefrontBreakPoints;
            before(function () {
                WORKAREA.config.storefrontBreakPoints.sizes = {
                    small: 320,
                    medium: 760,
                    wide: 960,
                    x_wide: 1160,
                    test: 999999
                };

                WORKAREA.breakPoints.createBreakPoints();
            });

            after(function(){
                WORKAREA.config.storefrontBreakPoints = config;
            });

            it('returns correct boolean value depending on current breakpoint', function () {
                expect(WORKAREA.breakPoints.currentlyLessThan('small')).to.be.false;
                expect(WORKAREA.breakPoints.currentlyLessThan('test')).to.be.true;
            });

            it('returns false unless a valid breakpoint name is provided', function () {
                expect(WORKAREA.breakPoints.currentlyLessThan('foo')).to.be.false;
                expect(WORKAREA.breakPoints.currentlyLessThan(1)).to.be.false;
                expect(WORKAREA.breakPoints.currentlyLessThan(undefined)).to.be.false;
            });
        });
    });
}());

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.5.27 test/javascripts/break_points_spec.js
workarea-storefront-3.5.26 test/javascripts/break_points_spec.js
workarea-storefront-3.4.45 test/javascripts/break_points_spec.js
workarea-storefront-3.5.25 test/javascripts/break_points_spec.js
workarea-storefront-3.5.23 test/javascripts/break_points_spec.js
workarea-storefront-3.4.44 test/javascripts/break_points_spec.js
workarea-storefront-3.5.22 test/javascripts/break_points_spec.js
workarea-storefront-3.4.43 test/javascripts/break_points_spec.js
workarea-storefront-3.5.21 test/javascripts/break_points_spec.js
workarea-storefront-3.4.42 test/javascripts/break_points_spec.js
workarea-storefront-3.5.20 test/javascripts/break_points_spec.js
workarea-storefront-3.4.41 test/javascripts/break_points_spec.js
workarea-storefront-3.5.19 test/javascripts/break_points_spec.js
workarea-storefront-3.4.40 test/javascripts/break_points_spec.js
workarea-storefront-3.5.18 test/javascripts/break_points_spec.js
workarea-storefront-3.4.39 test/javascripts/break_points_spec.js
workarea-storefront-3.5.17 test/javascripts/break_points_spec.js
workarea-storefront-3.4.38 test/javascripts/break_points_spec.js
workarea-storefront-3.5.16 test/javascripts/break_points_spec.js
workarea-storefront-3.4.37 test/javascripts/break_points_spec.js