mermaid/karma.conf.js

78 lines
2.3 KiB
JavaScript
Raw Normal View History

// Karma configuration
// Generated on Mon Nov 03 2014 07:53:38 GMT+0100 (CET)
module.exports = function (config) {
2017-04-11 22:14:25 +08:00
config.set({
2017-04-17 00:12:30 +08:00
// base path that will be used to resolve all patterns (eg. files, exclude)
2017-04-11 22:14:25 +08:00
basePath: '.',
2017-04-17 00:12:30 +08:00
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
2017-04-11 22:14:25 +08:00
frameworks: ['browserify', 'jasmine'],
2017-04-17 00:12:30 +08:00
// list of files / patterns to load in the browser
2017-04-11 22:14:25 +08:00
files: [
'./src/*.spec.js',
'./src/diagrams/flowchart/**/*.spec.js',
'./src/diagrams/example/**/*.spec.js',
'./src/diagrams/sequenceDiagram/**/*.spec.js',
'./src/diagrams/classDiagram/**/*.spec.js',
'./src/diagrams/gantt/**/*.spec.js',
'./src/diagrams/gitGraph/**/*.spec.js'
],
preprocessors: {
2017-04-17 00:12:30 +08:00
'src/**/*.spec.js': ['browserify']
2017-04-11 22:14:25 +08:00
},
2017-04-17 00:12:30 +08:00
// list of files to exclude
// exclude: ['src/diagrams/*.js'],
2017-04-11 22:14:25 +08:00
browserify: {
debug: true,
2017-04-17 00:12:30 +08:00
// plugin: ['proxyquireify/plugin']
2017-04-11 22:14:25 +08:00
extensions: ['.js'],
configure: function (bundle) {
bundle.on('prebundle', function () {
bundle
2017-04-17 00:12:30 +08:00
.plugin('proxyquire-universal')
2017-04-11 22:14:25 +08:00
})
}
},
2017-04-17 00:12:30 +08:00
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
2017-04-17 00:12:30 +08:00
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
2017-04-11 22:14:25 +08:00
reporters: ['dots'],
2017-04-17 00:12:30 +08:00
// web server port
2017-04-11 22:14:25 +08:00
port: 9876,
2017-04-17 00:12:30 +08:00
// enable / disable colors in the output (reporters and logs)
2017-04-11 22:14:25 +08:00
colors: true,
2017-04-17 00:12:30 +08:00
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
2017-04-11 22:14:25 +08:00
logLevel: config.LOG_INFO,
2017-04-17 00:12:30 +08:00
// enable / disable watching file and executing tests whenever any file changes
2017-04-11 22:14:25 +08:00
autoWatch: true,
2017-04-17 00:12:30 +08:00
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
2017-04-11 22:14:25 +08:00
browsers: ['PhantomJS'],
plugins: [
'karma-jasmine',
'karma-phantomjs-launcher',
'karma-browserify',
'karma-babel-preprocessor'
],
2017-04-17 00:12:30 +08:00
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
2017-04-11 22:14:25 +08:00
singleRun: false
})
}