module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
"../../../../src/test/webapp/js/libs/angular.js",
"../../../../src/test/webapp/js/libs/angular-mocks.js",
"../../../../src/main/webapp/js/*.js",
"../../../../src/test/webapp/js/*.js"
],
exclude: [ ],
plugins:[
'karma-jasmine',
'karma-coverage',
'karma-phantomjs-launcher'
],
preprocessors: {
"../../../../src/main/webapp/js/*.js": 'coverage'
},
coverageReporter: {
type: "html",
dir: "target/karma-coverage"
},
reporters: ['dots', 'junit', 'coverage'],
port: 9876,
colors: false,
logLevel: config.LOG_DEBUG,
autoWatch: false,
browsers: ['PhantomJS'],
captureTimeout: 60000,
singleRun: true
});
};
cmd /C karma start myhome\workspace6\angularjsexp\src\test\webapp\js\karma.conf.js --browsers PhantomJS --reporters dots,coverage --single-run --no-auto-watch --colors false
DEBUG [plugin]: Loading plugin karma-jasmine.
DEBUG [plugin]: Loading plugin karma-coverage.
DEBUG [plugin]: Loading plugin karma-phantomjs-launcher.
DEBUG [plugin]: Loading inlined plugin (defining ).
INFO [karma]: Karma v0.10.2 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
DEBUG [launcher]: Creating temp dir at C:\Cygwin\tmp\karma-3247752
DEBUG [launcher]: myhome\AppData\Roaming\npm\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom\phantomjs.exe C:\Cygwin\tmp\karma-3247752/capture.js
DEBUG [watcher]: Excluded file "myhome/workspace6/angularjsexp/src/test/webapp/js/karma.conf.js"
DEBUG [preprocessor.coverage]: Processing "myhome/workspace6/angularjsexp/src/main/webapp/js/blog.js".
DEBUG [watcher]: Resolved files:
myhome/AppData/Roaming/npm/node_modules/karma-jasmine/lib/jasmine.js
myhome/AppData/Roaming/npm/node_modules/karma-jasmine/lib/adapter.js
myhome/workspace6/angularjsexp/src/test/webapp/js/libs/angular.js
myhome/workspace6/angularjsexp/src/test/webapp/js/libs/angular-mocks.js
myhome/workspace6/angularjsexp/src/main/webapp/js/blog.js
myhome/workspace6/angularjsexp/src/test/webapp/js/blogSpec.js
DEBUG [web-server]: serving: myhome\AppData\Roaming\npm\node_modules\karma\static/client.html
DEBUG [web-server]: serving: myhome\AppData\Roaming\npm\node_modules\karma\static/karma.js
DEBUG [karma]: A browser has connected on socket i8z2fLFVN5jEUJNjRSPL
INFO [PhantomJS 1.9.2 (Windows 7)]: Connected on socket i8z2fLFVN5jEUJNjRSPL
DEBUG [karma]: All browsers are ready, executing
DEBUG [web-server]: serving: myhome\AppData\Roaming\npm\node_modules\karma\static/context.html
DEBUG [web-server]: serving: myhome/AppData/Roaming/npm/node_modules/karma-jasmine/lib/jasmine.js
DEBUG [web-server]: serving: myhome/AppData/Roaming/npm/node_modules/karma-jasmine/lib/adapter.js
DEBUG [web-server]: serving: C:\Cygwin\tmp/f83cc12edd8df4433c233d87dfc0474d118dce14.js
DEBUG [web-server]: serving: myhome/workspace6/angularjsexp/src/test/webapp/js/libs/angular.js
DEBUG [web-server]: serving: myhome/workspace6/angularjsexp/src/test/webapp/js/libs/angular-mocks.js
DEBUG [web-server]: serving: myhome/workspace6/angularjsexp/src/test/webapp/js/blogSpec.js
.
PhantomJS 1.9.2 (Windows 7): Executed 1 of 1 SUCCESS (0.194 secs / 0.008 secs)
DEBUG [launcher]: Disconnecting all browsers
DEBUG [launcher]: Killing PhantomJS
DEBUG [launcher]: Process PhantomJS exitted with code 0
DEBUG [launcher]: Cleaning temp dir C:\Cygwin\tmp\karma-3247752
I'm curious why you didn't use absolute paths instead of the relative paths?
If you are part of a development team (I am) it isn't too much to ask that everyone store their code in the same folder structure (my team does.) Configuring that same folder structure for your own machines (regardless of the OS) is even easier. If you're worried about shipping your tests with your project, it is generally understood that configs are different and will have to be adjusted before tests can be run.Those things aside, the base path is your friend. Once you get your test config onto another machine you can alter the base path to suit your folder structure. Your config file does not have to be in your source control (but it does help.)
--
You received this message because you are subscribed to the Google Groups "karma-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to karma-users...@googlegroups.com.
To post to this group, send email to karma...@googlegroups.com.
Visit this group at http://groups.google.com/group/karma-users.
For more options, visit https://groups.google.com/groups/opt_out.
To view this discussion on the web visit https://groups.google.com/d/msgid/karma-users/de8927e1-3139-4a98-bf48-0b7c24cfebb8%40googlegroups.com.