Commit 3695c6bc authored by Mike Greiling's avatar Mike Greiling

fix monaco loader test to not break with statically analyzed import statements

parent 63812b2f
/* global __webpack_public_path__ */
import monacoContext from 'monaco-editor/dev/vs/loader';
import monacoLoader from '~/repo/monaco_loader';
describe('MonacoLoader', () => {
it('calls require.config and exports require', () => {
spyOn(monacoContext.require, 'config');
const monacoLoader = require('~/repo/monaco_loader'); // eslint-disable-line global-require
expect(monacoContext.require.config).toHaveBeenCalledWith({
expect(monacoContext.require.getConfig()).toEqual(jasmine.objectContaining({
paths: {
vs: `${__webpack_public_path__}monaco-editor/vs`, // eslint-disable-line camelcase
},
});
expect(monacoLoader.default).toBe(monacoContext.require);
}));
expect(monacoLoader).toBe(monacoContext.require);
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment