Skip to content

Commit

Permalink
Use cross-browser helper to create event
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewiggins committed Oct 26, 2019
1 parent 26306a1 commit b895ac8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compat/test/browser/options-compat.test.js
@@ -1,8 +1,7 @@
import { vnodeSpy, eventSpy } from '../../../test/_util/optionSpies';

import { render, createElement, Component, createRef } from '../../src';
import { setupRerender } from 'preact/test-utils';
import { setupScratch, teardown } from '../../../test/_util/helpers';
import { setupScratch, teardown, createEvent } from '../../../test/_util/helpers';

/** @jsx createElement */

Expand Down Expand Up @@ -63,7 +62,7 @@ describe('compat options', () => {
render(<ClassApp />, scratch);
expect(scratch.innerHTML).to.equal('<button>0</button>');

buttonRef.current.dispatchEvent(new Event('click'));
buttonRef.current.dispatchEvent(createEvent('click'));
rerender();
expect(scratch.innerHTML).to.equal('<button>1</button>');

Expand Down

0 comments on commit b895ac8

Please sign in to comment.