Alexandre Bodin d7fd4ced2a Move test folder to fix import issue
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-27 22:31:30 +01:00

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,
},
});
});
});