Adding karma and unit tests to get started

This commit is contained in:
Colin McLeod
2015-06-11 21:04:52 -07:00
parent 3f8cf106a1
commit cc2d91cc51
6 changed files with 148 additions and 72 deletions

34
test/karma.conf.js Normal file
View File

@@ -0,0 +1,34 @@
// Karma configuration
// Generated on Thu Jun 11 2015 19:39:40 GMT-0700 (PDT)
module.exports = function(config) {
config.set({
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: [
'../build/lib*.js',
'../node_modules/angular-mocks/angular-mocks.js',
'../build/app*.js',
'tests/**/*.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'],
port: 9876,
colors: true,
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['Chrome'],
singleRun: false
});
};