Added unit tests for "parser.js" and "util.js"

This commit is contained in:
euvl
2017-08-07 16:07:57 +01:00
parent 72f5222e4b
commit 0089717a8c
10 changed files with 186 additions and 7 deletions

43
test/unit/karma.conf.js Normal file
View File

@@ -0,0 +1,43 @@
// Karma configuration
var webpackConfig = require('../../build/webpack.test.config.js')
module.exports = function(config) {
config.set({
frameworks: [
'mocha'
],
files: [
'./tests.webpack.js'
],
browsers: [
'Chrome'
],
preprocessors: {
'./tests.webpack.js': ['webpack', 'sourcemap']
},
reporters: ['spec'],
plugins: [
// Launchers
'karma-chrome-launcher',
// Test Libraries
'karma-mocha',
'karma-sinon-chai',
// Preprocessors
'karma-webpack',
'karma-sourcemap-loader',
// Reporters
'karma-spec-reporter',
'karma-coverage'
],
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
},
logLevel: config.LOG_INFO,
singleRun: true,
concurrency: Infinity,
})
}