solid-recharts 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/package.json +10 -7
- package/src/cartesian/Area.tsx +40 -55
- package/src/cartesian/Bar.tsx +66 -58
- package/src/cartesian/BarStack.tsx +5 -2
- package/src/cartesian/Brush.tsx +1 -1
- package/src/cartesian/Funnel.tsx +15 -19
- package/src/cartesian/Line.tsx +34 -51
- package/src/cartesian/LineDrawShape.tsx +8 -6
- package/src/cartesian/ReferenceArea.tsx +25 -35
- package/src/cartesian/ReferenceDot.tsx +24 -34
- package/src/cartesian/ReferenceLine.tsx +25 -34
- package/src/cartesian/Scatter.tsx +25 -37
- package/src/cartesian/XAxis.tsx +54 -67
- package/src/cartesian/YAxis.tsx +53 -66
- package/src/cartesian/ZAxis.tsx +27 -40
- package/src/chart/SunburstChart.tsx +1 -1
- package/src/component/ActivePoints.tsx +0 -9
- package/src/component/Customized.tsx +1 -1
- package/src/component/Dots.tsx +7 -3
- package/src/context/ErrorBarContext.tsx +15 -24
- package/src/polar/Pie.tsx +36 -48
- package/src/polar/PolarAngleAxis.tsx +41 -50
- package/src/polar/PolarRadiusAxis.tsx +40 -48
- package/src/polar/Radar.tsx +22 -34
- package/src/polar/RadialBar.tsx +21 -39
- package/src/shape/Curve.tsx +1 -1
- package/src/shape/Symbols.tsx +1 -1
- package/src/state/RechartsReduxContext.tsx +1 -1
- package/src/state/SetLegendPayload.ts +19 -27
- package/src/state/SetTooltipEntrySettings.tsx +9 -26
- package/src/state/cartesianAxisSlice.ts +40 -60
- package/src/state/createCollectionActions.ts +51 -0
- package/src/state/createSelector.ts +97 -0
- package/src/state/externalEventsMiddleware.ts +2 -11
- package/src/state/graphicalItemsSlice.ts +27 -40
- package/src/state/isEventThrottled.ts +12 -0
- package/src/state/keyboardEventsMiddleware.ts +2 -8
- package/src/state/layoutSlice.ts +8 -4
- package/src/state/legendSlice.ts +24 -26
- package/src/state/mouseEventsMiddleware.ts +2 -13
- package/src/state/patched.ts +19 -0
- package/src/state/referenceElementsSlice.ts +40 -31
- package/src/state/registerInStore.ts +68 -0
- package/src/state/selectors/areaSelectors.ts +13 -36
- package/src/state/selectors/arrayEqualityCheck.ts +32 -7
- package/src/state/selectors/axisSelectors.ts +215 -169
- package/src/state/selectors/barSelectors.ts +8 -36
- package/src/state/selectors/combiners/combineConfiguredScale.ts +1 -1
- package/src/state/selectors/combiners/combineRealScaleType.ts +1 -1
- package/src/state/selectors/dataSelectors.ts +35 -16
- package/src/state/selectors/numberDomainEqualityCheck.ts +16 -8
- package/src/state/selectors/selectAxisForGraphicalItem.ts +52 -0
- package/src/state/store.ts +0 -1
- package/src/state/tooltipSlice.ts +93 -64
- package/src/util/ActiveShapeUtils.tsx +0 -7
- package/src/util/BarUtils.tsx +27 -22
- package/src/util/ChartUtils.ts +69 -25
- package/src/util/propsAreEqual.ts +3 -33
- package/src/util/stacks/stackTypes.ts +1 -1
- package/src/util/types.ts +2 -2
- package/test/animation/CSSTransitionAnimate.timing.spec.tsx +1 -1
- package/test/animation/JavascriptAnimate.spec.tsx +1 -1
- package/test/animation/legacyAnimationLengthChange.spec.tsx +1 -1
- package/test/cartesian/Area.animation.spec.tsx +1 -1
- package/test/cartesian/Area.range.spec.tsx +1 -1
- package/test/cartesian/Area.spec.tsx +1 -1
- package/test/cartesian/Area.stacked.render.spec.tsx +1 -1
- package/test/cartesian/Area.typed.spec.tsx +1 -1
- package/test/cartesian/Axis.integration.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.csstransition.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.typed.spec.tsx +1 -1
- package/test/cartesian/Bar.animation.spec.tsx +1 -1
- package/test/cartesian/Bar.stackDomain.spec.tsx +1 -1
- package/test/cartesian/Bar.stacked.render.spec.tsx +1 -1
- package/test/cartesian/Bar.zeroDimensionFiltering.spec.tsx +1 -1
- package/test/cartesian/Brush.keyboard.spec.tsx +1 -1
- package/test/cartesian/Brush.panorama.spec.tsx +1 -1
- package/test/cartesian/Brush.props.spec.tsx +1 -1
- package/test/cartesian/Brush.render.spec.tsx +1 -1
- package/test/cartesian/Brush.spec.tsx +1 -1
- package/test/cartesian/Brush.stacked.spec.tsx +1 -1
- package/test/cartesian/CartesianAxis.render.spec.tsx +1 -1
- package/test/cartesian/CartesianAxis.spec.tsx +2 -2
- package/test/cartesian/CartesianGrid.render.spec.tsx +1 -1
- package/test/cartesian/CartesianGrid.spec.tsx +1 -1
- package/test/cartesian/ErrorBar.render.spec.tsx +1 -1
- package/test/cartesian/ErrorBar.spec.tsx +1 -1
- package/test/cartesian/Funnel.animation.spec.tsx +1 -1
- package/test/cartesian/Funnel.spec.tsx +1 -1
- package/test/cartesian/Funnel.typed.spec.tsx +1 -1
- package/test/cartesian/GraphicalItemClipPath.scale-behavior.spec.tsx +2 -2
- package/test/cartesian/Line.animation.spec.tsx +1 -1
- package/test/cartesian/Line.sparseAnimationPath.spec.tsx +1 -1
- package/test/cartesian/Line.spec.tsx +1 -1
- package/test/cartesian/Line.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.render.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.render.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.panorama.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/getEndPoints.spec.ts +1 -1
- package/test/cartesian/ReferenceLine.render.spec.tsx +1 -1
- package/test/cartesian/Scatter.animation.spec.tsx +1 -1
- package/test/cartesian/Scatter.render.spec.tsx +1 -1
- package/test/cartesian/Scatter.spec.tsx +1 -1
- package/test/cartesian/Scatter.typed.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.barSize.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.brush.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.categorydomain.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.datatypes.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.hide.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.multiaxis.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.numberdomain.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.padding.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.padding_clip.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.state.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.tick.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.timescale.spec.tsx +2 -2
- package/test/cartesian/XAxis/XAxis.typed.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.vertical.spec.tsx +1 -1
- package/test/cartesian/XAxis.tickFormatter.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.7362.derivedDomain.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.interval-zero.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.label.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.tick.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.tickFormatter.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.typed.spec.tsx +1 -1
- package/test/cartesian/ZAxis.spec.tsx +1 -1
- package/test/cartesian/ZAxis.typed.spec.tsx +1 -1
- package/test/cartesian/axisLineAndStroke.spec.tsx +1 -1
- package/test/cartesian/miscFeatureGaps.spec.tsx +1 -1
- package/test/chart/AccessibilityLayer.spec.tsx +1 -1
- package/test/chart/AccessibilityScans.spec.tsx +2 -2
- package/test/chart/AreaChart.spec.tsx +1 -1
- package/test/chart/AreaChart.typed.spec.tsx +1 -1
- package/test/chart/BarChart.spec.tsx +1 -1
- package/test/chart/BarChart.typed.spec.tsx +1 -1
- package/test/chart/CategoricalChart.spec.tsx +1 -1
- package/test/chart/ComposedChart.spec.tsx +1 -1
- package/test/chart/ComposedChart.typed.spec.tsx +1 -1
- package/test/chart/FunnelChart.spec.tsx +1 -1
- package/test/chart/FunnelChart.typed.spec.tsx +1 -1
- package/test/chart/LineChart.smoke.spec.tsx +1 -1
- package/test/chart/LineChart.spec.tsx +1 -1
- package/test/chart/LineChart.typed.spec.tsx +1 -1
- package/test/chart/NicheChartTooltip.spec.tsx +1 -1
- package/test/chart/PieChart.spec.tsx +1 -1
- package/test/chart/PieChart.typed.spec.tsx +1 -1
- package/test/chart/RadarChart.spec.tsx +1 -1
- package/test/chart/RadarChart.typed.spec.tsx +1 -1
- package/test/chart/RadialBarChart.spec.tsx +1 -1
- package/test/chart/RadialBarChart.typed.spec.tsx +1 -1
- package/test/chart/RechartsWrapper.spec.tsx +1 -1
- package/test/chart/Sankey.content.spec.tsx +1 -1
- package/test/chart/Sankey.spec.tsx +1 -1
- package/test/chart/ScatterChart.spec.tsx +1 -1
- package/test/chart/ScatterChart.typed.spec.tsx +1 -1
- package/test/chart/SunburstChart.spec.tsx +1 -1
- package/test/chart/Treemap.animation.spec.tsx +1 -1
- package/test/chart/Treemap.spec.tsx +1 -1
- package/test/chart/chartEvents.spec.tsx +1 -1
- package/test/chart/responsive.spec.tsx +1 -1
- package/test/component/Cell.render.spec.tsx +1 -1
- package/test/component/Cell.spec.tsx +1 -1
- package/test/component/Cursor.spec.tsx +1 -1
- package/test/component/DefaultTooltipContent.spec.tsx +1 -1
- package/test/component/Label.render.spec.tsx +1 -1
- package/test/component/Label.spec.tsx +1 -1
- package/test/component/LabelList.spec.tsx +1 -1
- package/test/component/Legend.itemSorter.spec.tsx +1 -1
- package/test/component/Legend.render.spec.tsx +1 -1
- package/test/component/Legend.spec.tsx +1 -1
- package/test/component/ResponsiveContainer.spec.tsx +1 -1
- package/test/component/ResponsiveContainerDataTest.spec.tsx +1 -1
- package/test/component/Text.spec.tsx +1 -1
- package/test/component/Tooltip/ActiveDot.spec.tsx +1 -1
- package/test/component/Tooltip/tooltipEventType.spec.tsx +1 -1
- package/test/component/Tooltip/tooltipTestHelpers.tsx +1 -1
- package/test/component/Tooltip.defaultIndex.spec.tsx +1 -1
- package/test/component/Tooltip.hover.spec.tsx +1 -1
- package/test/component/Tooltip.item.spec.tsx +1 -1
- package/test/component/Tooltip.keyboard.spec.tsx +1 -1
- package/test/component/Tooltip.payload.spec.tsx +1 -1
- package/test/component/Tooltip.touch.spec.tsx +1 -1
- package/test/component/Tooltip.visibility.spec.tsx +1 -1
- package/test/component/TooltipBoundingBox.spec.tsx +2 -2
- package/test/container/ClipPath.spec.tsx +1 -1
- package/test/context/chartLayoutContext.spec.tsx +1 -1
- package/test/helper/createSelectorTestCase.tsx +1 -1
- package/test/helper/mockAxes.ts +1 -1
- package/test/helper/selectorTestHelpers.tsx +1 -1
- package/test/hooks/useActiveTooltipDataPoints.spec.tsx +1 -1
- package/test/hooks/useOffset.spec.tsx +1 -1
- package/test/hooks/useTooltipStateHooks.spec.tsx +1 -1
- package/test/polar/Pie/Pie-TwoLevelPieChart.spec.tsx +1 -1
- package/test/polar/Pie/Pie.spec.tsx +1 -1
- package/test/polar/Pie/Pie.typed.spec.tsx +1 -1
- package/test/polar/Pie.animation.spec.tsx +1 -1
- package/test/polar/PieWithLegend.animation.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.events.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.typed.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis.render.spec.tsx +1 -1
- package/test/polar/PolarGrid.render.spec.tsx +1 -1
- package/test/polar/PolarGrid.spec.tsx +1 -1
- package/test/polar/PolarLegendPerRow.render.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.events.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.render.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.typed.spec.tsx +1 -1
- package/test/polar/PolarTooltipLegend.render.spec.tsx +1 -1
- package/test/polar/Radar.animation.spec.tsx +1 -1
- package/test/polar/Radar.render.spec.tsx +1 -1
- package/test/polar/Radar.spec.tsx +1 -1
- package/test/polar/Radar.typed.spec.tsx +1 -1
- package/test/polar/RadialBar/RadialBar.spec.tsx +1 -1
- package/test/polar/RadialBar/RadialBar.typed.spec.tsx +1 -1
- package/test/polar/RadialBar.animation.spec.tsx +1 -1
- package/test/polar/RadialBar.render.spec.tsx +1 -1
- package/test/polar/RadialBar.stacked.spec.tsx +1 -1
- package/test/setup.ts +1 -1
- package/test/shape/ActiveShape.spec.tsx +1 -1
- package/test/shape/Cross.spec.tsx +1 -1
- package/test/shape/Curve.spec.tsx +2 -2
- package/test/shape/Curve.typed.spec.tsx +1 -1
- package/test/shape/Dot.spec.tsx +1 -1
- package/test/shape/Polygon.spec.tsx +1 -1
- package/test/shape/Rectangle.animation.spec.tsx +1 -1
- package/test/shape/Rectangle.spec.tsx +1 -1
- package/test/shape/Sector.spec.tsx +1 -1
- package/test/shape/Symbols.spec.tsx +1 -1
- package/test/shape/Trapezoid.spec.tsx +1 -1
- package/test/state/createCollectionActions.spec.ts +87 -0
- package/test/state/createSelector.spec.ts +158 -0
- package/test/state/hooks.spec.tsx +1 -1
- package/test/state/registerInStore.spec.tsx +101 -0
- package/test/state/selectors/axisSelectors.spec.tsx +1 -1
- package/test/state/selectors/combiners/combineConfiguredScale.spec.ts +1 -1
- package/test/state/selectors/combiners/combineRealScaleType.spec.ts +1 -1
- package/test/state/selectors/dataSelectors.spec.tsx +1 -1
- package/test/state/selectors/legendSelectors.spec.tsx +1 -1
- package/test/state/selectors/radarSelectors.spec.tsx +1 -1
- package/test/state/selectors/selectActiveTooltipIndex.spec.tsx +1 -1
- package/test/state/selectors/selectDisplayedData.spec.tsx +1 -1
- package/test/state/selectors/selectStackGroups.spec.tsx +1 -1
- package/test/state/selectors/selectorMemoization.spec.tsx +136 -0
- package/test/state/selectors/selectors.spec.tsx +1 -1
- package/test/util/CartesianUtils/CartesianUtils.spec.ts +1 -1
- package/test/util/ChartUtils/ChartUtils.spec.ts +1 -1
- package/test/util/ChartUtils/getCateCoordinateOfLine.spec.ts +14 -0
- package/test/util/ChartUtils/getStackedData.spec.ts +1 -1
- package/test/util/ChartUtils/truncateByDomain.spec.ts +1 -1
- package/test/util/DomUtils.spec.tsx +1 -1
- package/test/util/FunnelUtils.spec.tsx +1 -1
- package/test/util/scale/createCategoricalInverse.spec.ts +1 -1
- package/test/util/useElementOffset.spec.tsx +1 -1
- package/test/util/usePrefersReducedMotion.spec.ts +1 -1
- package/test/util/useUniqueId.spec.ts +1 -1
- package/test/zIndex/AllZIndexPortals.spec.tsx +1 -1
- package/test/zIndex/DynamicZIndex.spec.tsx +1 -1
- package/test/zIndex/ZIndexLayer.portalOwner.spec.tsx +1 -1
- package/test/zIndex/componentZIndex.spec.tsx +1 -1
- package/test/zIndex/multiChartZIndexIsolation.spec.tsx +1 -1
- package/test-results/.last-run.json +4 -0
- package/NEXT_SESSION_PROMPT.md +0 -114
- package/src/state/reduxDevtoolsJsonStringifyReplacer.ts +0 -15
- package/src/util/axisPropsAreEqual.ts +0 -42
- package/src/util/resolveDefaultProps.tsx +0 -8
- package/src/util/typedDataKey.ts +0 -8
- package/test/helper/render.ts +0 -7
- package/test/state/reduxDevtoolsJsonStringifyReplacer.spec.ts +0 -25
- package/test/util/axisPropsAreEqual.spec.ts +0 -93
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// mapped to pixels through both cartesian scales (CartesianScaleHelperImpl).
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
4
|
import { flush } from "solid-js";
|
|
5
|
-
import { render } from "
|
|
5
|
+
import { render } from "@solidjs/testing-library";
|
|
6
6
|
import { LineChart, Line, XAxis, YAxis, ReferenceDot } from "../../src";
|
|
7
7
|
|
|
8
8
|
const data = [
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// the React-component `shape` prop-equality case.
|
|
8
8
|
import { describe, expect, it, test, vi } from "vitest";
|
|
9
9
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
10
|
-
import { fireEvent, render } from "
|
|
10
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
11
11
|
import { Bar, BarChart, LineChart, ReferenceDot, XAxis, YAxis } from "../../src";
|
|
12
12
|
import { useAppSelector } from "../../src/state/hooks";
|
|
13
13
|
import { selectReferenceDotsByAxis } from "../../src/state/selectors/axisSelectors";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { type DotProps, Line, LineChart, ReferenceDot, getRelativeCoordinate } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/cartesian/ReferenceDot.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// hook directly in a render body.
|
|
19
19
|
import { describe, expect, it, vi } from "vitest";
|
|
20
20
|
import { createEffect, flush } from "solid-js";
|
|
21
|
-
import { render } from "
|
|
21
|
+
import { render } from "@solidjs/testing-library";
|
|
22
22
|
import { Brush, ComposedChart, Line, LineChart, ReferenceLine, XAxis, YAxis } from "../../../src";
|
|
23
23
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
24
24
|
import { selectAxisRangeWithReverse } from "../../../src/state/selectors/axisSelectors";
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
// it is type-incompatible with the kebab LineSVGAttributes and has no effect).
|
|
27
27
|
import { describe, expect, it, test, vi } from "vitest";
|
|
28
28
|
import { createEffect, createSignal, flush, Show } from "solid-js";
|
|
29
|
-
import { fireEvent, render, screen } from "
|
|
29
|
+
import { fireEvent, render, screen } from "@solidjs/testing-library";
|
|
30
30
|
import { Bar, BarChart, Line, LineChart, ReferenceLine, XAxis, YAxis } from "../../../src";
|
|
31
31
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
32
32
|
import { selectReferenceLinesByAxis } from "../../../src/state/selectors/axisSelectors";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { Line, LineChart, ReferenceLine, getRelativeCoordinate } from "../../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/cartesian/ReferenceLine/ReferenceLine.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { scaleLinear } from "
|
|
2
|
+
import { scaleLinear } from "d3-scale";
|
|
3
3
|
import { getEndPoints, type ReferenceLineSegment } from "../../../src/cartesian/ReferenceLine";
|
|
4
4
|
import type { CartesianViewBoxRequired } from "../../../src/util/types";
|
|
5
5
|
import {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// a vertical line at x=category spans the full plot height at that band's x.
|
|
6
6
|
import { describe, expect, it } from "vitest";
|
|
7
7
|
import { flush } from "solid-js";
|
|
8
|
-
import { render } from "
|
|
8
|
+
import { render } from "@solidjs/testing-library";
|
|
9
9
|
import { LineChart, Line, XAxis, YAxis, ReferenceLine } from "../../src";
|
|
10
10
|
|
|
11
11
|
const data = [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
// be reproduced.
|
|
33
33
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
34
34
|
import { createSignal, flush } from "solid-js";
|
|
35
|
-
import { render, fireEvent } from "
|
|
35
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
36
36
|
import { ScatterChart, Scatter, Legend } from "../../src";
|
|
37
37
|
import { AnimationControllerProvider } from "../../src/animation/useAnimationController";
|
|
38
38
|
import { MockControllerAnimationManager as MockProgressAnimationManager } from "../animation/mockControllerAnimationManager";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// selectScatterPoints.
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
import { ScatterChart, Scatter, XAxis, YAxis } from "../../src";
|
|
8
8
|
|
|
9
9
|
const data = [
|
|
@@ -19,7 +19,7 @@ import { assertNotNull } from "../helper/assertNotNull";
|
|
|
19
19
|
import { expectScatterPoints } from "../helper/expectScatterPoints";
|
|
20
20
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
21
21
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
22
|
-
import { fireEvent, render } from "
|
|
22
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
23
23
|
import { dataWithSpecialNameAndFillProperties, PageData } from "../_data";
|
|
24
24
|
import { selectTooltipPayload } from "../../src/state/selectors/tooltipSelectors";
|
|
25
25
|
import { selectActiveTooltipPayload } from "../../src/state/selectors/tooltipSelectors";
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import { describe, expect, it } from "vitest";
|
|
25
25
|
import { Scatter, ScatterChart } from "../../src";
|
|
26
26
|
import type { ScatterPointItem } from "../../src/cartesian/Scatter";
|
|
27
|
-
import { render } from "
|
|
27
|
+
import { render } from "@solidjs/testing-library";
|
|
28
28
|
|
|
29
29
|
type ExampleDataPoint = {
|
|
30
30
|
x: number;
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
2
2
|
import { createEffect } from "solid-js";
|
|
3
3
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
4
4
|
import { Bar, BarChart, XAxis, YAxis } from "../../../src";
|
|
5
|
-
import { render } from "
|
|
5
|
+
import { render } from "@solidjs/testing-library";
|
|
6
6
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
7
7
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
8
8
|
import { expectBars } from "../../helper/expectBars";
|
|
@@ -3,7 +3,7 @@ import { createEffect } from "solid-js";
|
|
|
3
3
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
4
4
|
import { selectTicksOfAxis } from "../../../src/state/selectors/axisSelectors";
|
|
5
5
|
import { BarChart, Brush, XAxis } from "../../../src";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
8
8
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from "vitest";
|
|
2
2
|
import { Bar, BarChart, Line, LineChart, Scatter, useXAxisDomain, XAxis } from "../../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
5
5
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
6
6
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
@@ -4,7 +4,7 @@ import { describe, it } from "vitest";
|
|
|
4
4
|
import { ComposedChart, XAxis } from "../../../src";
|
|
5
5
|
import { coordinateWithValueData, dateWithValueData, pageData, timeData } from "../../_data";
|
|
6
6
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
|
|
9
9
|
const normalizedDateString = (date: Date): string =>
|
|
10
10
|
date.toString().replace(/\(.*?\)/, "(Coordinated Universal Time)");
|
|
@@ -8,7 +8,7 @@ import { pageData } from "../../_data";
|
|
|
8
8
|
import { createSelectorTestCase } from "../../helper/createSelectorTestCase";
|
|
9
9
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
10
10
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
|
|
13
13
|
describe("XAxis hide", () => {
|
|
14
14
|
it("Don't render x-axis when hide is set to be true", () => {
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
2
2
|
import { createEffect } from "solid-js";
|
|
3
3
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
4
4
|
import { Line, LineChart, Tooltip, XAxis } from "../../../src";
|
|
5
|
-
import { render } from "
|
|
5
|
+
import { render } from "@solidjs/testing-library";
|
|
6
6
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
7
7
|
import { selectXAxisPosition } from "../../../src/state/selectors/axisSelectors";
|
|
8
8
|
import { pageData } from "../../_data";
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
2
2
|
import { createSignal, flush } from "solid-js";
|
|
3
3
|
import type { JSX } from "@solidjs/web";
|
|
4
4
|
import { BarChart, Line, LineChart, XAxis } from "../../../src";
|
|
5
|
-
import { render } from "
|
|
5
|
+
import { render } from "@solidjs/testing-library";
|
|
6
6
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
7
7
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
8
8
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import { selectBarBandSize } from "../../../src/state/selectors/barSelectors";
|
|
9
9
|
import { selectChartOffsetInternal } from "../../../src/state/selectors/selectChartOffsetInternal";
|
|
10
10
|
import { Bar, BarChart, XAxis, YAxis } from "../../../src";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
13
13
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
14
14
|
import { expectBars } from "../../helper/expectBars";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { Bar, BarChart, XAxis, YAxis } from "../../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
describe("XAxis padding with allowDataOverflow", () => {
|
|
6
6
|
it("should clip data reaching into the padding area when allowDataOverflow is true", () => {
|
|
@@ -3,7 +3,7 @@ import type { Mock } from "vitest";
|
|
|
3
3
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
4
4
|
import type { JSX } from "@solidjs/web";
|
|
5
5
|
import { BarChart, XAxis } from "../../../src";
|
|
6
|
-
import { render, fireEvent } from "
|
|
6
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
7
7
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
8
8
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
9
9
|
import {
|
|
@@ -3,7 +3,7 @@ import type { Mock } from "vitest";
|
|
|
3
3
|
import type { JSX } from "@solidjs/web";
|
|
4
4
|
import { Bar, BarChart, ComposedChart, Line, LineChart, XAxis, YAxis } from "../../../src";
|
|
5
5
|
import type { CartesianTickContentProps } from "../../../src";
|
|
6
|
-
import { render, fireEvent } from "
|
|
6
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
7
7
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
8
8
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
9
9
|
import { expectLastCalledWith, expectNthCalledWith } from "../../helper/expectLastCalledWith";
|
|
@@ -2,11 +2,11 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
2
2
|
import { createEffect } from "solid-js";
|
|
3
3
|
// @ts-expect-error d3-time-format ships no types and victory-vendor does not re-export it.
|
|
4
4
|
import { timeFormat } from "d3-time-format";
|
|
5
|
-
import { scaleTime } from "
|
|
5
|
+
import { scaleTime } from "d3-scale";
|
|
6
6
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
7
7
|
import { selectRealScaleType } from "../../../src/state/selectors/axisSelectors";
|
|
8
8
|
import { Line, LineChart, XAxis, YAxis } from "../../../src";
|
|
9
|
-
import { render } from "
|
|
9
|
+
import { render } from "@solidjs/testing-library";
|
|
10
10
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
11
11
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
12
12
|
import type { XAxisProps } from "../../../src/cartesian/XAxis";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it } from "vitest";
|
|
2
2
|
import { getRelativeCoordinate, Line, LineChart, XAxis, type TickItem } from "../../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/cartesian/XAxis/XAxis.typed.spec.tsx.
|
|
6
6
|
//
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
selectDisplayedData,
|
|
17
17
|
} from "../../../src/state/selectors/axisSelectors";
|
|
18
18
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
19
|
-
import { render } from "
|
|
19
|
+
import { render } from "@solidjs/testing-library";
|
|
20
20
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
21
21
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
22
22
|
import type { XAxisSettings } from "../../../src/state/cartesianAxisSlice";
|
|
@@ -4,7 +4,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
4
4
|
import { Line, LineChart, XAxis } from "../../src";
|
|
5
5
|
import { PageData } from "../_data";
|
|
6
6
|
import { expectXAxisTicks } from "../helper/expectAxisTicks";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
|
|
9
9
|
describe("XAxis with custom tickFormatter", () => {
|
|
10
10
|
it("should render ticks formatted with tickFormatter", () => {
|
|
@@ -26,7 +26,7 @@ import type { AxisDomain, AxisTick } from "../../../src/util/types";
|
|
|
26
26
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
27
27
|
import { expectYAxisTicks } from "../../helper/expectAxisTicks";
|
|
28
28
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
29
|
-
import { render } from "
|
|
29
|
+
import { render } from "@solidjs/testing-library";
|
|
30
30
|
|
|
31
31
|
type Datum = { name: string; value: number | null };
|
|
32
32
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { flush } from "solid-js";
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
4
|
import { Line, LineChart, XAxis, YAxis } from "../../../src";
|
|
5
|
-
import { render } from "
|
|
5
|
+
import { render } from "@solidjs/testing-library";
|
|
6
6
|
|
|
7
7
|
describe("YAxis interval={0} with custom ticks - comprehensive tests", () => {
|
|
8
8
|
const data = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
2
|
import { YAxis, Label, AreaChart, Area } from "../../../src";
|
|
3
|
-
import { render, screen } from "
|
|
3
|
+
import { render, screen } from "@solidjs/testing-library";
|
|
4
4
|
import { PageData } from "../../_data";
|
|
5
5
|
import { assertNotNull } from "../../helper/assertNotNull";
|
|
6
6
|
|
|
@@ -41,7 +41,7 @@ import { getCalculatedYAxisWidth } from "../../../src/util/YAxisUtils";
|
|
|
41
41
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
42
42
|
import { createSelectorTestCase } from "../../helper/createSelectorTestCase";
|
|
43
43
|
import { assertNotNull } from "../../helper/assertNotNull";
|
|
44
|
-
import { render, fireEvent } from "
|
|
44
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
45
45
|
|
|
46
46
|
describe("<YAxis />", () => {
|
|
47
47
|
const data = [
|
|
@@ -3,7 +3,7 @@ import type { Mock } from "vitest";
|
|
|
3
3
|
import type { JSX } from "@solidjs/web";
|
|
4
4
|
import { Bar, BarChart, ComposedChart, Line, LineChart, XAxis, YAxis } from "../../../src";
|
|
5
5
|
import type { CartesianTickContentProps } from "../../../src";
|
|
6
|
-
import { render, fireEvent } from "
|
|
6
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
7
7
|
import { expectYAxisTicks } from "../../helper/expectAxisTicks";
|
|
8
8
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
9
9
|
import { expectLastCalledWith, expectNthCalledWith } from "../../helper/expectLastCalledWith";
|
|
@@ -4,7 +4,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
4
4
|
import { Line, LineChart, YAxis } from "../../../src";
|
|
5
5
|
import { PageData } from "../../_data";
|
|
6
6
|
import { expectYAxisTicks } from "../../helper/expectAxisTicks";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
|
|
9
9
|
describe("YAxis with custom tickFormatter", () => {
|
|
10
10
|
it("should render ticks formatted with tickFormatter", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it } from "vitest";
|
|
2
2
|
import { getRelativeCoordinate, Line, LineChart, YAxis, type TickItem } from "../../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/cartesian/YAxis/YAxis.typed.spec.tsx.
|
|
6
6
|
//
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, it, expect, vi } from "vitest";
|
|
2
2
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
3
3
|
import type { JSX } from "@solidjs/web";
|
|
4
|
-
import { fireEvent, render } from "
|
|
4
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
5
5
|
import {
|
|
6
6
|
BarChart,
|
|
7
7
|
CartesianGrid,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it } from "vitest";
|
|
2
2
|
import { Scatter, ScatterChart, ZAxis } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/cartesian/ZAxis.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// unit-test them on the cartesian axes (only PolarAngleAxis tests axisLine=false).
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { Line, LineChart, XAxis, YAxis } from "../../src";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
|
|
8
8
|
const data = [
|
|
9
9
|
{ name: "a", uv: 100 },
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
getTooltip,
|
|
24
24
|
} from "../component/Tooltip/tooltipTestHelpers";
|
|
25
25
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
26
|
-
import { fireEvent, render } from "
|
|
26
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
27
27
|
|
|
28
28
|
function assertChartA11yAttributes(svg: Element): void {
|
|
29
29
|
expect(svg).not.toBeNull();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// 7a23854).
|
|
3
3
|
//
|
|
4
4
|
// Harness deviations: React `render` -> Solid `render(() => <…/>)` + `flush()`;
|
|
5
|
-
// @testing-library/react ->
|
|
5
|
+
// @testing-library/react -> @solidjs/testing-library.
|
|
6
6
|
//
|
|
7
7
|
// The reference spec's PRIMARY assertion in every case is
|
|
8
8
|
// `expect((await axe(container, AXE_OPTIONS)).violations).toEqual([])` (axe-core static a11y
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
exampleTreemapData,
|
|
56
56
|
} from "../_data";
|
|
57
57
|
import { expectScatterPoints } from "../helper/expectScatterPoints";
|
|
58
|
-
import { render } from "
|
|
58
|
+
import { render } from "@solidjs/testing-library";
|
|
59
59
|
|
|
60
60
|
const AXE_OPTIONS = { rules: { "color-contrast": { enabled: false } } } as const;
|
|
61
61
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// fails it via the global guard in test/setup.ts.
|
|
19
19
|
import { beforeEach, describe, expect, it, test, vi } from "vitest";
|
|
20
20
|
import { createEffect, flush } from "solid-js";
|
|
21
|
-
import { render } from "
|
|
21
|
+
import { render } from "@solidjs/testing-library";
|
|
22
22
|
import { AreaChart, Area, XAxis, YAxis } from "../../src";
|
|
23
23
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
24
24
|
import { expectAreaCurve } from "../helper/expectAreaCurve";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// because the bar registers via an effect and its rectangles compute from the store.
|
|
9
9
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
10
10
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
11
|
-
import { render, fireEvent } from "
|
|
11
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
12
12
|
import { BarChart, Bar, ComposedChart, Rectangle, Tooltip, XAxis, YAxis } from "../../src";
|
|
13
13
|
import type { BarChartProps, BarProps, BarRectangleItem } from "../../src";
|
|
14
14
|
import { PageData, boxPlotData } from "../_data";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { Bar, BarChart, LineChart, PieChart } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/chart/BarChart.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "../../src";
|
|
30
30
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
31
31
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
32
|
-
import { fireEvent, render } from "
|
|
32
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
33
33
|
|
|
34
34
|
type WrapperProps = {
|
|
35
35
|
onClick: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { ComposedChart, Line } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/chart/ComposedChart.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// so that reference assertion is intentionally omitted.
|
|
13
13
|
import { describe, expect, it, vi } from "vitest";
|
|
14
14
|
import { flush } from "solid-js";
|
|
15
|
-
import { render, fireEvent } from "
|
|
15
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
16
16
|
import { FunnelChart, Funnel, Tooltip, Cell } from "../../src";
|
|
17
17
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
18
18
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { Funnel, FunnelChart } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/chart/FunnelChart.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// containers → chart composition) mounts and renders correct SVG end-to-end.
|
|
4
4
|
// The comprehensive `chartDimensions.spec` parity port is the next milestone.
|
|
5
5
|
import { describe, it, expect } from "vitest";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
import { LineChart } from "../../src";
|
|
8
8
|
|
|
9
9
|
describe("LineChart (empty-chart smoke)", () => {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
// call-count spies (render-count coupling).
|
|
25
25
|
import { describe, expect, it, test, vi } from "vitest";
|
|
26
26
|
import { createSignal, flush } from "solid-js";
|
|
27
|
-
import { render, fireEvent } from "
|
|
27
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
28
28
|
import { Brush, CartesianGrid, Legend, Line, LineChart, Tooltip, XAxis, YAxis } from "../../src";
|
|
29
29
|
import type { CurveType } from "../../src/shape/Curve";
|
|
30
30
|
import type { LabelContentType } from "../../src/component/Label";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// hover dispatches through the store before the tooltip portal updates.
|
|
5
5
|
import { describe, expect, it } from "vitest";
|
|
6
6
|
import { flush } from "solid-js";
|
|
7
|
-
import { render, fireEvent } from "
|
|
7
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
8
8
|
import { SunburstChart, Treemap, Sankey, Tooltip } from "../../src";
|
|
9
9
|
|
|
10
10
|
function tipItems(container: Element): Array<string | null> {
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "../helper/expectPieSectors";
|
|
24
24
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
25
25
|
import { selectDisplayedData, selectPieLegend } from "../../src/state/selectors/pieSelectors";
|
|
26
|
-
import { render, fireEvent } from "
|
|
26
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
27
27
|
import { PageData } from "../_data";
|
|
28
28
|
|
|
29
29
|
const SECTOR_SELECTOR = ".recharts-pie-sector path.recharts-sector";
|
|
@@ -15,7 +15,7 @@ import { createEffect, createSignal, flush } from "solid-js";
|
|
|
15
15
|
import { describe, expect, it, test, vi } from "vitest";
|
|
16
16
|
import { exampleRadarData } from "../_data";
|
|
17
17
|
import { PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart } from "../../src";
|
|
18
|
-
import { render, fireEvent } from "
|
|
18
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
19
19
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
20
20
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
21
21
|
import { expectLastCalledWithScale } from "../helper/expectScale";
|
|
@@ -25,7 +25,7 @@ import { createEffect, flush } from "solid-js";
|
|
|
25
25
|
import { describe, expect, it, test, vi } from "vitest";
|
|
26
26
|
import { Cell, Legend, RadialBar, RadialBarChart, Sector, Tooltip } from "../../src";
|
|
27
27
|
import type { SectorProps } from "../../src/shape/Sector";
|
|
28
|
-
import { render, fireEvent } from "
|
|
28
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
29
29
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
30
30
|
import { trim } from "../helper/trim";
|
|
31
31
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { RadialBar, RadialBarChart } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/chart/RadialBarChart.typed.spec.tsx.
|
|
6
6
|
|