我想模拟某个模块的函数,但即使在阅读了这里的之后,我仍然收到错误:const mockGetPermissions = {getPermissions: jest.fn()}控制台:
The module factory of `jest.mock()` is not allowed to referenceUint16Array, Uint32Array, Uint8Array, Uint8ClampedAr
我尝试用以下方法模拟一个功能组件(使用Hooks):但是它抛出了这个错误:
file.js: babel-plugin-jest-hoist:The module factory of `jest.mock()` is not allowed to reference any out-of-scope variables