karma-runner / karma-runner/karma
basePath does not work properly in some circumstances
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
I am running karma using gulp. This is a gulp task module I require:
``` js
var karma = require("karma");
module.exports = function (done) {
new karma.Server({
configFile: '../../../karma.conf.js',
singleRun: true
}, function (exitCode) {
done();
}).start();
};
```
The module file is on path `root/tasks/test/karma.js`. I have a `root/karma.conf.js` as you can see... It contains this:
``` js
module.exports = function (config) {
config.set({
basePath: __dirname,
frameworks: ['jasmine'],
files: [
{pattern: 'src/nodelist.js', included: true},
{pattern: 'tests/*.js', included: true}
],
exclude: [],
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Firefox'],
captureTimeout: 6000,
singleRun: false
});
};
```
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?
Contributor guide
Assessment
This issue has not been assessed yet.