fix: unit tests

This commit is contained in:
Marc-Roig 2023-05-02 10:51:27 +02:00
parent 7b9940acf4
commit 00ec2c98a8
No known key found for this signature in database
GPG Key ID: FB4E2C43A0BEE249
2 changed files with 4 additions and 7 deletions

View File

@ -47,6 +47,10 @@ describe('Upload plugin bootstrap function', () => {
weeklyMetrics: {
registerCron() {},
},
extensions: {
contentManager: { entityManager: { addSignedFileUrlsToAdmin: jest.fn() } },
core: { entityService: { addSignedFileUrlsToEntityService: jest.fn() } },
},
},
},
},

View File

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