UNPKG

@splidejs/splide

Version:

Splide is a lightweight, flexible and accessible slider/carousel. No dependencies, no Lighthouse errors.

15 lines (12 loc) 413 B
import { fire } from '../../../test'; import { prevent } from './prevent'; describe( 'prevent', () => { test( 'can prevent the default browser action of an event.', done => { window.addEventListener( 'click', e => { prevent( e ); expect( e.defaultPrevented ).toBe( true ); done(); } ); fire( window, 'click', { timeStamp: 123 }, { cancelable: true } ); } ); } );