fix: fragmentation

This commit is contained in:
fraujulian committed 2026-05-14 14:57:54 +02:00
1 parent 13693165df
commit 9cc7249278
3 files changed
+32 -8

No files matched your search

+15 -3
View File
@@ -429,18 +429,30 @@ describe('HomeComponent', (): void => {
// ── RAF debouncing (performance) ───────────────────────────────────────────
describe('Performance', (): void => {
it('should keep scroll effects enabled on small viewports when motion is allowed', (): void => {
spyOnProperty(window, 'innerWidth').and.returnValue(390);
it('should keep scroll effects enabled on desktop pointers when motion is allowed', (): void => {
spyOn(window, 'matchMedia').and.callFake(
(query: string): MediaQueryList =>
({
matches: query !== '(prefers-reduced-motion: reduce)',
matches:
query !== '(prefers-reduced-motion: reduce)' &&
query !== '(hover: none) and (pointer: coarse)',
}) as MediaQueryList,
);
expect(comp.shouldEnableScrollEffects()).toBeTrue();
});
it('should disable scroll effects on coarse touch pointers', (): void => {
spyOn(window, 'matchMedia').and.callFake(
(query: string): MediaQueryList =>
({
matches: query === '(hover: none) and (pointer: coarse)',
}) as MediaQueryList,
);
expect(comp.shouldEnableScrollEffects()).toBeFalse();
});
it('should disable scroll effects when reduced motion is requested', (): void => {
spyOn(window, 'matchMedia').and.callFake(
(query: string): MediaQueryList =>