mirror of
https://github.com/strapi/strapi.git
synced 2025-11-04 20:07:19 +00:00
fix: unit tests
This commit is contained in:
parent
7b9940acf4
commit
00ec2c98a8
@ -47,6 +47,10 @@ describe('Upload plugin bootstrap function', () => {
|
|||||||
weeklyMetrics: {
|
weeklyMetrics: {
|
||||||
registerCron() {},
|
registerCron() {},
|
||||||
},
|
},
|
||||||
|
extensions: {
|
||||||
|
contentManager: { entityManager: { addSignedFileUrlsToAdmin: jest.fn() } },
|
||||||
|
core: { entityService: { addSignedFileUrlsToEntityService: jest.fn() } },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -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', () => {
|
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();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user