Skip to content

Commit

Permalink
Fix incorrect copy-paste in test (#19657)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Aug 20, 2020
1 parent 64ddef4 commit 08e69f6
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -967,8 +967,8 @@ describe('DOMPluginEventSystem', () => {
<div ref={middleDivRef}>
<div
ref={divRef}
onClick={onFocus}
onClickCapture={onFocusCapture}
onFocus={onFocus}
onFocusCapture={onFocusCapture}
tabIndex={0}>
Click me!
</div>
Expand All @@ -980,7 +980,7 @@ describe('DOMPluginEventSystem', () => {
React.useLayoutEffect(() => {
// This should prevent the portalElement listeners from
// capturing the events in the bubble phase.
middleDivRef.current.addEventListener('click', e => {
middleDivRef.current.addEventListener('focusin', e => {
e.stopPropagation();
});
});
Expand All @@ -1007,7 +1007,7 @@ describe('DOMPluginEventSystem', () => {
const divElement = divRef.current;
divElement.focus();
expect(onFocus).toHaveBeenCalledTimes(1);
expect(onFocusCapture).toHaveBeenCalledTimes(1);
expect(onFocusCapture).toHaveBeenCalledTimes(3);

document.body.removeChild(portalElement);
});
Expand Down

0 comments on commit 08e69f6

Please sign in to comment.