Skip to content

Commit

Permalink
fix(pie): fix existing tests due to usage of @nivo/arcs
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Dec 18, 2020
1 parent 70c1ef2 commit 6d5fb27
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 59 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ package-test-cover-%: ##@1 packages run tests for a package with code coverage
package-test-%: ##@1 packages run tests for a package
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests

package-watch-test-%: ##@1 packages run tests for a package and watch for changes
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests --watch

package-update-test-%: ##@1 packages run tests for a package and update its snapshots
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests -u

Expand Down
6 changes: 5 additions & 1 deletion packages/pie/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { Box, Dimensions, Theme, SvgDefsAndFill } from '@nivo/core'
import { Box, Dimensions, Theme, SvgDefsAndFill, ModernMotionProps } from '@nivo/core'
import { OrdinalColorScaleConfig, InheritedColorConfig } from '@nivo/colors'
import { LegendProps } from '@nivo/legends'
import { Arc, ArcGenerator, ArcTransitionMode } from '@nivo/arcs'
Expand Down Expand Up @@ -134,6 +134,8 @@ export type PieSvgProps<RawDatum> = DataProps<RawDatum> &
SvgDefsAndFill<ComputedDatum<RawDatum>> &
PieHandlers<RawDatum, SVGPathElement> & {
layers?: PieLayer<RawDatum>[]
animate?: boolean
motionConfig?: ModernMotionProps['motionConfig']
transitionMode?: ArcTransitionMode
}

Expand All @@ -143,6 +145,8 @@ export type CompletePieSvgProps<RawDatum> = DataProps<RawDatum> &
SvgDefsAndFill<ComputedDatum<RawDatum>> &
PieHandlers<RawDatum, SVGPathElement> & {
layers: PieLayer<RawDatum>[]
animate: boolean
motionConfig: ModernMotionProps['motionConfig']
transitionMode: ArcTransitionMode
}

Expand Down
Loading

0 comments on commit 6d5fb27

Please sign in to comment.