/* global __webpack_public_path__ */
import monacoContext from 'monaco-editor/dev/vs/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({
      paths: {
        vs: `${__webpack_public_path__}monaco-editor/vs`, // eslint-disable-line camelcase
      },
    });
    expect(monacoLoader.default).toBe(monacoContext.require);
  });
});

@@ -30,16 +30,17 @@
 th__ */%0A
+%0A
 import m
@@ -87,16 +87,65 @@
 loader';
+%0Aimport monacoLoader from '~/repo/monaco_loader';
 %0A%0Adescri
@@ -236,13 +236,14 @@
     
-spyOn
+expect
 (mon
@@ -264,180 +264,54 @@
 uire
-, 'config');%0A%0A    const monacoLoader = require('~/repo/monaco_loader'); // eslint-disable-line global-require%0A%0A    expect(monacoContext.require.config).toHaveBeenCalledWith
+.getConfig()).toEqual(jasmine.objectContaining
 (%7B%0A 
@@ -430,16 +430,17 @@
 ,%0A    %7D)
+)
 ;%0A    ex
@@ -460,16 +460,8 @@
 ader
-.default
 ).to

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