gitlab-org--gitlab-foss/spec/javascripts/breakpoints_spec.js

14 lines
346 B
JavaScript
Raw Normal View History

2018-10-17 03:13:26 -04:00
import bp, { breakpoints } from '~/breakpoints';
describe('breakpoints', () => {
2018-10-17 03:13:26 -04:00
Object.keys(breakpoints).forEach(key => {
const size = breakpoints[key];
it(`returns ${key} when larger than ${size}`, () => {
spyOn(bp, 'windowWidth').and.returnValue(size + 10);
expect(bp.getBreakpointSize()).toBe(key);
});
});
});