From 28c20ef8885fb04048d38fcfcf05f149e0a05152 Mon Sep 17 00:00:00 2001 From: Niels Lange Date: Tue, 12 Mar 2024 15:44:55 +0700 Subject: [PATCH] Fix failing JS unit tests --- .../components/cart-checkout/totals/footer-item/index.tsx | 2 +- .../packages/components/totals/item/index.tsx | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/totals/footer-item/index.tsx b/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/totals/footer-item/index.tsx index df6bdfdda740..b9948793df5f 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/totals/footer-item/index.tsx +++ b/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/totals/footer-item/index.tsx @@ -85,7 +85,7 @@ const TotalsFooterItem = ( { const priceComponent = ( diff --git a/plugins/woocommerce-blocks/packages/components/totals/item/index.tsx b/plugins/woocommerce-blocks/packages/components/totals/item/index.tsx index 529835dcd597..17bd6489998b 100644 --- a/plugins/woocommerce-blocks/packages/components/totals/item/index.tsx +++ b/plugins/woocommerce-blocks/packages/components/totals/item/index.tsx @@ -26,11 +26,7 @@ const TotalsItemValue = ( { currency, }: Partial< TotalsItemProps > ): ReactElement | null => { if ( isValidElement( value ) ) { - return ( -
- { value } -
- ); + return <>{ value }; } return Number.isFinite( value ) ? (