feat: add plugins including image-upload (#12)

This adds the image upload "plugin" and all the desired built-in plugins.
Per the following two tickets
https://openedx.atlassian.net/browse/TNL-9367
https://openedx.atlassian.net/browse/TNL-9475

I need to add the requisite plugins, as well as a framework for the image upload modal.
This commit is contained in:
connorhaugh
2022-02-14 12:33:49 -05:00
committed by GitHub
parent 2f931b5bdb
commit eef30348fd
5 changed files with 110 additions and 24 deletions

View File

@@ -6,6 +6,22 @@ import 'babel-polyfill';
Enzyme.configure({ adapter: new Adapter() });
/* need to mock window for tinymce on import, as it is JSDOM incompatible */
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation(query => ({
matches: false,
media: query,
onchange: null,
addListener: jest.fn(), // Deprecated
removeListener: jest.fn(), // Deprecated
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
})),
});
// These configuration values are usually set in webpack's EnvironmentPlugin however
// Jest does not use webpack so we need to set these so for testing
process.env.ACCESS_TOKEN_COOKIE_NAME = 'edx-jwt-cookie-header-payload';