From f83ca7de6b8ebc344cab5e2c2adad0db55a7b86d Mon Sep 17 00:00:00 2001 From: PP_Pro Date: Wed, 13 Sep 2023 16:00:01 +0800 Subject: [PATCH] fix npm test --- tests/init.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/init.ts b/tests/init.ts index 3fb2cbfee0e..c0d43a203b7 100644 --- a/tests/init.ts +++ b/tests/init.ts @@ -55,6 +55,12 @@ jest.mock( { virtual: true, }, ); +jest.mock( + '@base/global', + () => jest.requireActual('../cocos/base/global/src/index.ts'), + { virtual: true, }, +); + jest.mock( 'pal/pacer', () => jest.requireActual('../pal/pacer/pacer-web'),