6

I'm trying to use the Karma test-runner in PyCharm. I ran the karma init script, and selected to include the Require.js plugin from this init script. Then, when I tried running the test-runner, I got notifications like this: Uncaught Error: Module name "assert" has not been loaded yet for context: _. Use require([])

So I had to download assert using "npm install assert", and then include a line like this in my karma.conf.js file: {pattern: 'node_modules/assert/assert.js', included: true}, in the files array.

But now I am getting a similar complaint like this: Uncaught Error: Module name "util/" has not been loaded yet for context: _. Use require([]), and although I installed using 'npm install util' and the folder now shows up under my node_modules folder, nothing I do seems to fix the problem.

Any suggestions would be much appreciated.

Louis
  • 146,715
  • 28
  • 274
  • 320
ekofman
  • 299
  • 3
  • 12
  • That's a requireJS error. You're using it the wrong way... I guess... because you did not share any code! – glepretre Nov 28 '14 at 17:09

0 Answers0