请检查以下场景
const url = 'https://mock.com/mockpath';
jest.mock('../../src/somefile', () => {
return ({
getURL: jest.fn(() => url),
});
});
我收到错误
babel-plugin-jest-hoist: The module factory of `jest.mock()` is not allowed to reference any out-of-scope variables.
Invalid variable access: url