mirror of
https://github.com/strapi/strapi.git
synced 2025-08-09 17:26:11 +00:00
37 lines
733 B
JavaScript
37 lines
733 B
JavaScript
const bootstrap = require('../config/functions/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,
|
|
},
|
|
});
|
|
});
|
|
});
|