Open negative0 opened 5 years ago
This is the line from my package.json: "@toast-ui/react-image-editor": "^1.0.0"
Firefox, Pop_OS 18.04 Node: v10.16.0.
The code is working fine in the brower, but when I try to do snapshot test of the component with ImageLoader in it, I get the following error:
FAIL src/views/Explorer/RemoteExplorerLayout/RemoteExplorerLayout.test.js ● Test suite failed to run
TypeError: Cannot read property 'createClass' of undefined 7 | import 'tui-image-editor/dist/tui-image-editor.css' 8 | > 9 | import ImageEditor from '@toast-ui/react-image-editor' | ^ 10 | 11 | function ImageLoader({downloadURL, inViewport, imageData, downloadImage, currentPath}) { 12 | at Object.<anonymous> (node_modules/tui-image-editor/dist/tui-image-editor.js:12869:39)
Component:
const myTheme = { // Theme object to extends default dark theme. }; const MyComponent = () => ( <ImageEditor includeUI={{ loadImage: { path: imageData.data, name: 'SampleImage' }, theme: myTheme, menu: ['shape', 'filter', 'crop'], initMenu: 'filter', uiSize: { width: '80vw', height: '90vh' }, menuBarPosition: 'bottom', }} cssMaxHeight={500} cssMaxWidth={700} selectionStyle={{ cornerSize: 20, rotatingPointOffset: 70 }} usageStatistics={false} /> );
Version
This is the line from my package.json: "@toast-ui/react-image-editor": "^1.0.0"
Test Environment
Firefox, Pop_OS 18.04 Node: v10.16.0.
Current Behaviour:
The code is working fine in the brower, but when I try to do snapshot test of the component with ImageLoader in it, I get the following error:
FAIL src/views/Explorer/RemoteExplorerLayout/RemoteExplorerLayout.test.js ● Test suite failed to run
Component: