Canvas.test.tsx 985 B

12345678910111213141516171819202122232425262728293031
  1. import * as React from 'react'
  2. import { Canvas } from './Canvas'
  3. import { useApp } from '~hooks'
  4. import { renderWithApp } from '~test/renderWithApp'
  5. describe('Canvas', () => {
  6. test('mounts component without crashing', () => {
  7. const Test = () => {
  8. const app = useApp()
  9. return (
  10. <Canvas
  11. brush={app.brush}
  12. hoveredShape={app.hoveredShape}
  13. selectionBounds={app.selectionBounds}
  14. selectedShapes={app.selectedShapesArray}
  15. erasingShapes={app.erasingShapesArray}
  16. shapes={app.shapesInViewport}
  17. showGrid={app.settings.showGrid}
  18. showSelection={app.showSelection}
  19. showSelectionRotation={app.showSelectionRotation}
  20. showResizeHandles={app.showResizeHandles}
  21. showRotateHandles={app.showRotateHandles}
  22. showSelectionDetail={app.showSelectionDetail}
  23. showContextBar={app.showContextBar}
  24. />
  25. )
  26. }
  27. renderWithApp(<Test />)
  28. })
  29. })