File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ import {render, screen} from '@testing-library/react';
77import { describe , test , expect , vi } from 'vitest' ;
88import { I18nextProvider } from 'react-i18next' ;
99import i18n from 'util/i18nForTests' ;
10- import { color } from '@amcharts/amcharts5/.internal/core/util/Color' ;
1110import { ResizeObserverMock } from 'mocks/resize' ;
11+ import ExportingRegistry from '@/context/ExportContext' ;
1212
1313const LineChartTest = ( ) => {
1414 const localization = useMemo ( ( ) => {
@@ -58,9 +58,11 @@ describe('LineChart', () => {
5858 vi . stubGlobal ( 'ResizeObserver' , ResizeObserverMock ) ;
5959 test ( 'renders LineChart' , ( ) => {
6060 render (
61- < I18nextProvider i18n = { i18n } >
62- < LineChartTest />
63- </ I18nextProvider >
61+ < ExportingRegistry >
62+ < I18nextProvider i18n = { i18n } >
63+ < LineChartTest />
64+ </ I18nextProvider >
65+ </ ExportingRegistry >
6466 ) ;
6567
6668 expect ( screen . getByTestId ( 'chartdiv' ) ) . toBeInTheDocument ( ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import HeatMap from '@/components/Sidebar/MapComponents/HeatMap';
99import { ThemeProvider } from '@mui/system' ;
1010import Theme from '@/util/Theme' ;
1111import { FeatureCollection , GeoJsonProperties } from 'geojson' ;
12+ import ExportingRegistry from '@/context/ExportContext' ;
1213
1314const HeatMapTest = ( ) => {
1415 const geoData = useMemo ( ( ) => {
@@ -111,9 +112,11 @@ const HeatMapTest = () => {
111112describe ( 'HeatMap' , ( ) => {
112113 test ( 'renders HeatMap component' , ( ) => {
113114 render (
114- < ThemeProvider theme = { Theme } >
115- < HeatMapTest />
116- </ ThemeProvider >
115+ < ExportingRegistry >
116+ < ThemeProvider theme = { Theme } >
117+ < HeatMapTest />
118+ </ ThemeProvider >
119+ </ ExportingRegistry >
117120 ) ;
118121
119122 expect ( screen . getByTestId ( 'map' ) ) . toBeInTheDocument ( ) ;
You can’t perform that action at this time.
0 commit comments