diff options
author | 2019-07-17 18:46:32 +0000 | |
---|---|---|
committer | 2019-07-17 18:46:32 +0000 | |
commit | f98db8c551f6f626e2220d62ba6170920eba5ef7 (patch) | |
tree | 05a7e3d235a2692fefa53b994f5e36699d242486 /tests/karma.conf.js | |
parent | dd57fb4f248e2832c7e05e9a20002bfa2a402412 (diff) | |
parent | 0aba5286824d653f95a6454de0fbf91d4a5410b8 (diff) |
Merge "LAAS-44: Unit Test Javascript"
Diffstat (limited to 'tests/karma.conf.js')
-rw-r--r-- | tests/karma.conf.js | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/tests/karma.conf.js b/tests/karma.conf.js new file mode 100644 index 0000000..4a1fb95 --- /dev/null +++ b/tests/karma.conf.js @@ -0,0 +1,87 @@ +// Karma configuration +// Generated on Mon Jul 08 2019 14:57:05 GMT-0400 (Eastern Daylight Time) + +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: ['mocha', 'chai'], + + + // list of files / patterns to load in the browser + files: [ + 'https://code.jquery.com/jquery-3.4.1.min.js', + '../src/static/js/dashboard.js', + '../src/static/js/mxClient.min.js', + 'tests/*.js' + ], + + + // list of files / patterns 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: ['dots'], + + + // 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_ERROR, + + + // 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: ['ChromeHeadless', 'FirefoxHeadless'], + + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: true, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: Infinity, + + // Custom web browsers + customLaunchers: { + FirefoxHeadless: { + base: 'Firefox', + flags: ['-headless'] + } + }, + + // Use TDD instead of BDD for Mocha + client: { + mocha: { + ui: 'tdd' + } + } + }) +} |