Commit 5622c090 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Fix monaco_loader_spec

parent 02e1e991
/* global __webpack_public_path__ */
import monacoContext from 'monaco-editor/dev/vs/loader';
describe('MonacoLoader', () => { describe('MonacoLoader', () => {
it('sets __monaco_context__', () => { it('calls require.config and exports require', () => {
const monacoContext = require('monaco-editor/dev/vs/loader'); // eslint-disable-line global-require spyOn(monacoContext.require, 'config');
const monacoLoader = require('~/repo/monaco_loader'); // eslint-disable-line global-require
expect(window.__monaco_context__) // eslint-disable-line no-underscore-dangle expect(monacoContext.require.config).toHaveBeenCalledWith({
.toBe(monacoContext); paths: {
vs: `${__webpack_public_path__}monaco-editor/vs`, // eslint-disable-line camelcase
},
});
expect(monacoLoader.default).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