From 7b25de56e8545f974502f4b6bf8e0b117381e47c Mon Sep 17 00:00:00 2001 From: Nils Stolpe Date: Tue, 5 Nov 2024 12:40:47 -0500 Subject: [PATCH] moved diff testing code to avoid failing snapshot test attempting to ignore node_modules in diff --- .github/workflows/ci.yml | 2 +- packages/victory-candlestick/src/helper-methods.ts | 10 +++++++++- .../victory-candlestick/src/victory-candlestick.tsx | 9 --------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f62d7380..cf8447d95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: 📄 Bundle size report uses: ./.github/actions/bundle-size # path to composite action with: - paths: "packages/**/*.min.js" + paths: "packages/**/dist/*.min.js" onlyDiff: "true" # branch: "develop" # branch to compare to header: "Bundle size report" # PR comment header diff --git a/packages/victory-candlestick/src/helper-methods.ts b/packages/victory-candlestick/src/helper-methods.ts index ccc2a7d84..9662fdaf2 100644 --- a/packages/victory-candlestick/src/helper-methods.ts +++ b/packages/victory-candlestick/src/helper-methods.ts @@ -488,4 +488,12 @@ export const getBaseProps = (initialProps, fallbackProps) => { }; // @TODO: remove this before merging, it's just for verifying the analysis and report. -const fake = () => "fake"; + +// @TODO: remove this when analyzer diff is confirmed to work. +export const bundleSizeIsDifferent = () => { + const x = "the bundle size should be different"; + const y = "the bundle size should be different"; + const z = "the bundle size should be different"; + + return { x, y, z }; +}; diff --git a/packages/victory-candlestick/src/victory-candlestick.tsx b/packages/victory-candlestick/src/victory-candlestick.tsx index 959b32da9..9178c3c35 100644 --- a/packages/victory-candlestick/src/victory-candlestick.tsx +++ b/packages/victory-candlestick/src/victory-candlestick.tsx @@ -306,12 +306,3 @@ class VictoryCandlestickBase extends React.Component { } export const VictoryCandlestick = addEvents(VictoryCandlestickBase, options); - -// @TODO: remove this when analyzer diff is confirmed to work. -export const bundleSizeIsDifferent = () => { - const x = "the bundle size should be different"; - const y = "the bundle size should be different"; - const z = "the bundle size should be different"; - - return { x, y, z }; -};