From ec277c94022df9026a3ef76b29a4bffb3ef330bc Mon Sep 17 00:00:00 2001 From: Thomas Roberts Date: Mon, 23 Oct 2023 12:51:58 +0100 Subject: [PATCH] Mock getSetting so it returns the default value --- assets/js/blocks/reviews/test/frontend-block.test.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/blocks/reviews/test/frontend-block.test.tsx b/assets/js/blocks/reviews/test/frontend-block.test.tsx index cc84ffcb49e..68ef81127fd 100644 --- a/assets/js/blocks/reviews/test/frontend-block.test.tsx +++ b/assets/js/blocks/reviews/test/frontend-block.test.tsx @@ -7,7 +7,9 @@ jest.mock( '../utils', () => ( { jest.mock( '@woocommerce/settings', () => ( { ...jest.requireActual( '@woocommerce/settings' ), - getSetting: jest.fn().mockReturnValue( true ), + getSetting: jest + .fn() + .mockImplementation( ( setting, defaultValue ) => defaultValue ), } ) ); /**