From b102c1bb4990af0d970745037c74c242df3836a5 Mon Sep 17 00:00:00 2001 From: Brian Sztamfater Date: Fri, 28 Jul 2023 16:49:58 -0300 Subject: [PATCH] try fix jest mock --- .../components/graph/wallet_graph/view.cljs | 50 +++++++++---------- test/jest/jestSetup.js | 7 --- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/src/quo2/components/graph/wallet_graph/view.cljs b/src/quo2/components/graph/wallet_graph/view.cljs index ddf324eb0d9e..871204227e38 100644 --- a/src/quo2/components/graph/wallet_graph/view.cljs +++ b/src/quo2/components/graph/wallet_graph/view.cljs @@ -37,30 +37,30 @@ {:accessibility-label :illustration :style style/illustration} [text/text "Illustration here"]] - [charts/line-chart - {:accessibility-label :line-chart - :height 96 - :width (+ width 1) - :max-value max-value - :min-value 0 - :adjust-to-width true - :data data - :area-chart true - :start-fill-color fill-color - :end-fill-color fill-color - :hide-data-points true - :hide-rules true - :hide-y-axis-text true - :x-axis-indices-height 100 - :thickness 2 - :color line-color - :y-axis-thickness 0 - :x-axis-thickness 0 - :initial-spacing 0 - :end-spacing 0 - :disable-scroll true - :y-axis-label-width 0.01 - :labels-extra-height -36 - :x-axis-label-text-style style/x-axis-label-text-style}])])) + [rn/view {:accessibility-label :line-chart} + [charts/line-chart + {:height 96 + :width (+ width 1) + :max-value max-value + :min-value 0 + :adjust-to-width true + :data data + :area-chart true + :start-fill-color fill-color + :end-fill-color fill-color + :hide-data-points true + :hide-rules true + :hide-y-axis-text true + :x-axis-indices-height 100 + :thickness 2 + :color line-color + :y-axis-thickness 0 + :x-axis-thickness 0 + :initial-spacing 0 + :end-spacing 0 + :disable-scroll true + :y-axis-label-width 0.01 + :labels-extra-height -36 + :x-axis-label-text-style style/x-axis-label-text-style}]])])) (def wallet-graph (theme/with-theme wallet-graph-internal)) diff --git a/test/jest/jestSetup.js b/test/jest/jestSetup.js index 5f1198a32bde..ccb0b9e983e6 100644 --- a/test/jest/jestSetup.js +++ b/test/jest/jestSetup.js @@ -78,13 +78,6 @@ jest.mock('react-native-blob-util', () => ({ jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock')); -jest.mock('react-native-gifted-charts', () => ({ - BarChart: {}, - PieChart: {}, - LineChart: {}, - LineChartBicolor: {}, -})); - NativeModules.ReactLocalization = { language: 'en', locale: 'en',