summaryrefslogtreecommitdiff
path: root/spec/javascripts/ide/monaco_loader_spec.js
blob: 7ab315aa8c8fefb8f808ce68b464be1ac05200f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import monacoContext from 'monaco-editor/dev/vs/loader';
import monacoLoader from '~/ide/monaco_loader';

describe('MonacoLoader', () => {
  it('calls require.config and exports require', () => {
    expect(monacoContext.require.getConfig()).toEqual(
      jasmine.objectContaining({
        paths: {
          vs: `${__webpack_public_path__}monaco-editor/vs`, // eslint-disable-line camelcase
        },
      }),
    );
    expect(monacoLoader).toBe(monacoContext.require);
  });
});