Skip to content

Commit

Permalink
test: fix typescript triggerRef error
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasialanz committed Oct 3, 2024
1 parent bd25a61 commit ede47b8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/react/src/components/TopBar/TopBarMenu.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { createRef } from 'react';
import { OptionsMenuList } from '../OptionsMenu';
import { fireEvent, render, screen } from '@testing-library/react';
import TopBarMenu from './TopBarMenu';
Expand All @@ -17,8 +17,10 @@ const defaultProps = {
id: 'foo'
};

const triggerRef = createRef<HTMLButtonElement>();

const optionsMenu = (
<OptionsMenuList onClose={noop} onSelect={noop}>
<OptionsMenuList triggerRef={triggerRef} onClose={noop} onSelect={noop}>
<li>option 1</li>
<li>option 2</li>
</OptionsMenuList>
Expand Down

0 comments on commit ede47b8

Please sign in to comment.