Skip to content

Commit

Permalink
Tests dependencies
Browse files Browse the repository at this point in the history
Added karma conf with phantomjs and single-run
  • Loading branch information
abluchet committed May 16, 2014
1 parent dd57f6d commit 142d5e0
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 3 deletions.
7 changes: 6 additions & 1 deletion bower.json
Expand Up @@ -19,9 +19,14 @@
"test",
"tests"
],
"main": ["./dist/angular-charts.js"],
"main": [
"./dist/angular-charts.js"
],
"dependencies": {
"d3": "~3.3.10",
"angular": "latest"
},
"devDependencies": {
"angular-mocks": "~1.2.16"
}
}
71 changes: 71 additions & 0 deletions karma.conf.js
@@ -0,0 +1,71 @@
// Karma configuration
// Generated on Thu Mar 20 2014 10:18:18 GMT+0100 (CET)

module.exports = function(config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],


// list of files / patterns to load in the browser
files: [
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
'bower_components/d3/d3.js',
'dist/angular-charts.js',
'test/*.js'
],


// list of files to exclude
exclude: [

],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {

},


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],


// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};
11 changes: 9 additions & 2 deletions package.json
Expand Up @@ -14,9 +14,16 @@
"grunt-ngmin": "0.0.3",
"grunt-contrib-watch": "~0.5.3"
},
"devDependencies": {},
"devDependencies": {
"karma-chrome-launcher": "^0.1.3",
"karma-jasmine": "^0.1.5",
"grunt": "^0.4.5",
"grunt-karma": "^0.8.3",
"karma": "^0.12.16",
"karma-phantomjs-launcher": "^0.1.4"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "./node_modules/.bin/karma start --single-run --browsers PhantomJS"
},
"repository": "",
"author": "chinmaymk",
Expand Down
4 changes: 4 additions & 0 deletions travis.yml
@@ -0,0 +1,4 @@
language: node_js
node_js:
- 0.10
before_script: "bower install && grunt"

0 comments on commit 142d5e0

Please sign in to comment.