// Priority 4 — unit tests for the responsive breakpoint helpers. These are the // "needs config" tier: they default to the global `$grid-breakpoints`, but every // function also accepts an explicit `$breakpoints` map, so the tests pass a // local fixture map and stay independent of the project variables. @use '../mixins/bootstrap/breakpoints' as *; $grid: ( xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, ); @include describe('breakpoint-next') { @include it('returns the neighbouring breakpoint name') { @include assert-equal(breakpoint-next(md, $grid), lg); } @include it('returns null past the last breakpoint') { @include assert-equal(breakpoint-next(xl, $grid), null); } } @include describe('breakpoint-min') { @include it('returns the min width, or null for the zero breakpoint') { @include assert-equal(breakpoint-min(md, $grid), 768px); @include assert-equal(breakpoint-min(xs, $grid), null); } } @include describe('breakpoint-max') { @include it('subtracts 0.02px to avoid min/max overlap') { @include assert-equal(breakpoint-max(md, $grid), 767.98px); } } @include describe('breakpoint-infix') { @include it('is blank for the smallest breakpoint and dash-prefixed otherwise') { @include assert-equal(breakpoint-infix(xs, $grid), ''); @include assert-equal(breakpoint-infix(md, $grid), '-md'); } }