Welcome to mirror list, hosted at ThFree Co, Russian Federation.

breakpoints_spec.js « javascripts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b1b5d36c1fb57aaa605a87bd62c63f86e60bbb79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import bp, {
  breakpoints,
} from '~/breakpoints';

describe('breakpoints', () => {
  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);
    });
  });
});