mirror of
https://github.com/strapi/strapi.git
synced 2025-08-09 17:26:11 +00:00
37 lines
716 B
JavaScript
37 lines
716 B
JavaScript
![]() |
const bootstrap = require('../bootstrap');
|
||
|
|
||
|
describe('Upload plugin bootstrap function', () => {
|
||
|
test('Sets default config if id does not exist', async () => {
|
||
|
const setStore = jest.fn(() => {});
|
||
|
|
||
|
const strapi = {
|
||
|
config: {
|
||
|
info: {
|
||
|
dependencies: {},
|
||
|
},
|
||
|
},
|
||
|
plugins: {
|
||
|
upload: { config: {} },
|
||
|
},
|
||
|
store() {
|
||
|
return {
|
||
|
get() {
|
||
|
return null;
|
||
|
},
|
||
|
set: setStore,
|
||
|
};
|
||
|
},
|
||
|
};
|
||
|
|
||
|
await bootstrap(strapi);
|
||
|
|
||
|
expect(setStore).toHaveBeenCalledWith({
|
||
|
value: {
|
||
|
sizeOptimization: true,
|
||
|
videoPreview: true,
|
||
|
responsiveDimensions: true,
|
||
|
},
|
||
|
});
|
||
|
});
|
||
|
});
|