You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works now properly, but when I try to use basePath: "root", then it sets the basePath to root/../../../ which I think is because the configFile: '../../../karma.conf.js', part of the gulp task. I use win7 x64. Any idea why this happens?
The text was updated successfully, but these errors were encountered:
I would say it is a bug in Karma, which we should fix. This will be a breaking change though.
What happens is that Karma resolves the relative basePath relative to the configuration file directory (http://karma-runner.github.io/6.3/config/configuration-file.html#basepath). The directory of the configuration file is ../../../, hence the basePath is resolved to root/../../... This part works as intended.
The bug is that when using Karma programmatically the configuration file path is resolved relative to the node_modules/karma/lib instead of CWD, hence you have to set it as ../../../karma.conf.js instead of ./karma.conf.js. So we should change this part, which will, in turn, resolve the problem with basePath.
I am running karma using gulp. This is a gulp task module I require:
The module file is on path
root/tasks/test/karma.js
. I have aroot/karma.conf.js
as you can see... It contains this:It works now properly, but when I try to use
basePath: "root",
then it sets the basePath toroot/../../../
which I think is because theconfigFile: '../../../karma.conf.js',
part of the gulp task. I use win7 x64. Any idea why this happens?The text was updated successfully, but these errors were encountered: