Closed protazy closed 8 years ago
This is a pain point for me as well as it's causing me to be unable to run my karma tests. I'm a fan of option 2
Hello, I pushed the change. Thanks for the fix. Next time just make pull request.
var JASMINE_CORE_PATTERN = /(karma-jasmine)/i;
@protazy This works on Windows, thank you.
Hi,
This is the same issue as described in #4, but the reason is different.
Fix #17 introduced a regex pattern which allows loading reporter files in correct order:
var JASMINE_CORE_PATTERN = /(\/karma-jasmine\/)/i;
But this pattern does not take into account using a Windows machine, where backward slashes are used as path separators. Since the regex does not match, files are added in wrong order and running tests fails with "Uncaught ReferenceError: jasmineRequire is not defined".The easiest way to fix it would be to get rid of path separators entirely, or take into account both options:
var JASMINE_CORE_PATTERN = /(karma-jasmine)/i;
orvar JASMINE_CORE_PATTERN = /([\\/]karma-jasmine[\\/])/i;