summaryrefslogtreecommitdiff
path: root/spec/javascripts/breakpoints_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/breakpoints_spec.js')
-rw-r--r--spec/javascripts/breakpoints_spec.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/javascripts/breakpoints_spec.js b/spec/javascripts/breakpoints_spec.js
new file mode 100644
index 00000000000..b1b5d36c1fb
--- /dev/null
+++ b/spec/javascripts/breakpoints_spec.js
@@ -0,0 +1,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);
+ });
+ });
+});