Public Access
feat(settings): reduce animations switch
This commit is contained in:
1 parent
fa0857f55d
commit
2ec5833f29
9 files changed
+88
-12
No files matched your search
@@ -34,4 +34,13 @@ describe('Confetti', () => {
|
||||
|
||||
expect(container.querySelector('canvas')).toBeNull();
|
||||
});
|
||||
|
||||
it('draws nothing when the reduce animations setting is on', () => {
|
||||
reducedMotion(false);
|
||||
document.documentElement.setAttribute('data-reduce-motion', '');
|
||||
const {container} = render(<Confetti size="small"/>);
|
||||
document.documentElement.removeAttribute('data-reduce-motion');
|
||||
|
||||
expect(container.querySelector('canvas')).toBeNull();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user