Example #1
0
 it('should sync states between 2 event objects, if `syncState` is specified', function () {
     var event = new Event('foo', { x: 1 });
     var newEvent = Event.fromEvent(event, { syncState: true });
     newEvent.stopPropagation();
     newEvent.preventDefault();
     newEvent.stopImmediatePropagation();
     expect(event.isPropagationStopped()).toBe(true);
     expect(event.isDefaultPrevented()).toBe(true);
     expect(event.isImmediatePropagationStopped()).toBe(true);
 });
Example #2
0
 it('should take effect when called', function () {
     var event = new Event();
     event.preventDefault();
     expect(event.isDefaultPrevented()).toBe(true);
 });