debian-mirror-gitlab/spec/javascripts/breakpoints_spec.js

14 lines
346 B
JavaScript
Raw Normal View History

2018-12-13 13:39:08 +05:30
import bp, { breakpoints } from '~/breakpoints';
2017-09-10 17:25:29 +05:30
describe('breakpoints', () => {
2018-12-13 13:39:08 +05:30
Object.keys(breakpoints).forEach(key => {
2017-09-10 17:25:29 +05:30
const size = breakpoints[key];
it(`returns ${key} when larger than ${size}`, () => {
spyOn(bp, 'windowWidth').and.returnValue(size + 10);
expect(bp.getBreakpointSize()).toBe(key);
});
});
});