Skip to content

Commit ba44b04

Browse files
committed
karma config
1 parent 576af61 commit ba44b04

File tree

3 files changed

+80
-4
lines changed

3 files changed

+80
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
*.iml
22
npm-debug.log
33
node_modules
4+
.coverage
5+
lib

karma.conf.js

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
module.exports = function(config) {
2+
config.set({
3+
// base path, that will be used to resolve files and exclude
4+
basePath: '',
5+
6+
// frameworks to use
7+
frameworks: ['mocha'],
8+
9+
preprocessors: {
10+
'*.js': 'coverage',
11+
'test/*.coffee': 'coffee',
12+
},
13+
14+
// list of files / patterns to load in the browser
15+
files: [
16+
'js/*.js',
17+
'test/*.coffee'
18+
],
19+
20+
// list of files to exclude
21+
exclude: [],
22+
23+
// test results reporter to use
24+
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
25+
reporters: ['dots', 'coverage'],
26+
27+
coverageReporter: {
28+
type: 'html',
29+
dir: '.coverage'
30+
},
31+
32+
// web server port
33+
port: 9876,
34+
35+
// enable / disable colors in the output (reporters and logs)
36+
colors: true,
37+
38+
// level of logging
39+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
40+
logLevel: config.LOG_INFO,
41+
42+
// enable / disable watching file and executing tests whenever any file changes
43+
autoWatch: false,
44+
45+
// Start these browsers, currently available:
46+
// - Chrome
47+
// - ChromeCanary
48+
// - Firefox
49+
// - Opera
50+
// - Safari (only Mac)
51+
// - PhantomJS
52+
// - IE (only Windows)
53+
browsers: ['PhantomJS'],
54+
55+
// If browser does not capture in given timeout [ms], kill it
56+
captureTimeout: 60000,
57+
58+
// Continuous Integration mode
59+
// if true, it capture browsers, run tests and exit
60+
singleRun: false
61+
});
62+
};

package.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,30 @@
1515
],
1616
"author": "Josef van Niekerk <[email protected]>",
1717
"contributors": [
18-
"Josef van Niekerk <[email protected]>",
18+
"Josef van Niekerk <[email protected]>",
1919
"Sergey Todyshev <[email protected]>"
2020
],
21-
"dependencies": {
22-
},
21+
"dependencies": {},
2322
"devDependencies": {
2423
"grunt": "~0.4.1",
2524
"grunt-contrib-jshint": "~0.7.1",
2625
"grunt-npm": "~0.0.2",
2726
"grunt-bump": "~0.0.7",
2827
"grunt-auto-release": "~0.0.2",
29-
"grunt-cli": "~0.1.11"
28+
"grunt-cli": "~0.1.11",
29+
"karma-chrome-launcher": "~0.1.1",
30+
"karma-script-launcher": "~0.1.0",
31+
"karma-firefox-launcher": "~0.1.2",
32+
"karma-html2js-preprocessor": "~0.1.0",
33+
"karma-jasmine": "~0.1.4",
34+
"karma-coffee-preprocessor": "~0.1.1",
35+
"requirejs": "~2.1.9",
36+
"karma-requirejs": "~0.2.0",
37+
"karma-phantomjs-launcher": "~0.1.1",
38+
"karma": "~0.10.8",
39+
"karma-coverage": "~0.1.4",
40+
"mocha": "~1.15.1",
41+
"karma-mocha": "~0.1.1"
3042
},
3143
"scripts": {
3244
"lint": "grunt lint",

0 commit comments

Comments
 (0)