Skip to content

Commit

Permalink
perf(jest): fix .tsx jest tests for react-spring
Browse files Browse the repository at this point in the history
React Spring distributes ES6 by default, which breaks jest tests unless it's imported explicitly
using the cjs extension. see pmndrs/react-spring#555
  • Loading branch information
markov00 committed Apr 1, 2019
1 parent 56b173d commit 90f4f59
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/react_canvas/area_geometries.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Group as KonvaGroup } from 'konva';
import React from 'react';
import { Circle, Group, Path } from 'react-konva';
import { animated, Spring } from 'react-spring/renderprops-konva';
import { animated, Spring } from 'react-spring/renderprops-konva.cjs';
import { LegendItem } from '../../lib/series/legend';
import { AreaGeometry, getGeometryStyle, PointGeometry } from '../../lib/series/rendering';
import { AreaSeriesStyle, SharedGeometryStyle } from '../../lib/themes/theme';
Expand Down
2 changes: 1 addition & 1 deletion src/components/react_canvas/bar_geometries.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Group as KonvaGroup } from 'konva';
import React from 'react';
import { Group, Rect } from 'react-konva';
import { animated, Spring } from 'react-spring/renderprops-konva';
import { animated, Spring } from 'react-spring/renderprops-konva.cjs';
import { LegendItem } from '../../lib/series/legend';
import { BarGeometry, getGeometryStyle } from '../../lib/series/rendering';
import { BarSeriesStyle, SharedGeometryStyle } from '../../lib/themes/theme';
Expand Down
2 changes: 1 addition & 1 deletion src/components/react_canvas/line_geometries.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Group as KonvaGroup } from 'konva';
import React from 'react';
import { Circle, Group, Path } from 'react-konva';
import { animated, Spring } from 'react-spring/renderprops-konva';
import { animated, Spring } from 'react-spring/renderprops-konva.cjs';
import { LegendItem } from '../../lib/series/legend';
import { getGeometryStyle, LineGeometry, PointGeometry } from '../../lib/series/rendering';
import { LineSeriesStyle, SharedGeometryStyle } from '../../lib/themes/theme';
Expand Down

0 comments on commit 90f4f59

Please sign in to comment.