Skip to content

Commit

Permalink
fix: unit test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hassanad94 committed May 24, 2024
1 parent 16f45cc commit 1f36e62
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/sn-editor-react/test/bubble-menu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ import { Editor } from '../src/components/editor'
import { BubbleMenu } from './../src/components/bubble-menu'
import { mockInstance } from './__mocks__/mokInstance'

jest.mock('react-monaco-editor', () =>
jest.fn((props) => {
console.log(props)
return (
<div data-test="mock-monaco-editor" onChange={props.fieldOnChange} ref={props.editorRef}>
{props.value}
</div>
)
}),
)

describe('BubbleMenu', () => {
it('should be rendered BubbleMenu', () => {
const wrapper = mount(<Editor />)
Expand Down

0 comments on commit 1f36e62

Please sign in to comment.