Alexandre Bodin 2382332a4d Update to a more recent CI os version
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-28 12:06:44 +01:00

37 lines
731 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(() => {});
global.strapi = {
config: {
info: {
dependencies: {},
},
},
plugins: {
upload: { config: {} },
},
store() {
return {
get() {
return null;
},
set: setStore,
};
},
};
await bootstrap();
expect(setStore).toHaveBeenCalledWith({
value: {
sizeOptimization: true,
videoPreview: true,
responsiveDimensions: true,
},
});
});
});