fix(upload): failing register unit test

This commit is contained in:
Jamie Howard 2023-02-13 16:40:58 +00:00
parent e0f395b464
commit 95bc1dc9f0

View File

@ -32,6 +32,13 @@ jest.mock('@strapi/provider-upload-local', () => ({
}, },
})); }));
jest.mock('../utils', () => ({
...jest.requireActual('../utils'),
getService: () => ({
contentManager: { entityManager: { addSignedFileUrlsToAdmin: jest.fn() } },
}),
}));
describe('Upload plugin register function', () => { describe('Upload plugin register function', () => {
test('The upload plugin registers the /upload route', async () => { test('The upload plugin registers the /upload route', async () => {
const registerRoute = jest.fn(); const registerRoute = jest.fn();