Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
38elements committed Mar 1, 2020
1 parent 280c98c commit a71ade8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions compat/test/browser/events.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ describe('preact/compat events', () => {
expect(() => event.persist()).to.not.throw();
expect(() => event.isDefaultPrevented()).to.not.throw();
expect(() => event.isPropagationStopped()).to.not.throw();

expect(event.isDefaultPrevented()).to.be.false;
event.preventDefault();
expect(event.isDefaultPrevented()).to.be.true;

expect(event.isPropagationStopped()).to.be.false;
event.stopPropagation();
expect(event.isPropagationStopped()).to.be.true;
});

it('should normalize ondoubleclick event', () => {
Expand Down

0 comments on commit a71ade8

Please sign in to comment.