Skip to content

Commit

Permalink
fix: unite test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hassanad94 committed May 24, 2024
1 parent ef5b90e commit 33d2861
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/sn-editor-react/test/editor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ import { Editor } from '../src/components/editor'
import { MenuBar } from '../src/components/menu-bar'
import { defaultLocalization } from '../src/context'

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('editor', () => {
it('should be rendered properly', () => {
const wrapper = shallow(<Editor />)
Expand Down

0 comments on commit 33d2861

Please sign in to comment.