2018-07-27 10:18:29 -04:00
|
|
|
// Karma configuration
|
|
|
|
// http://karma-runner.github.io/0.10/config/configuration-file.html
|
|
|
|
|
2019-05-13 14:10:08 -04:00
|
|
|
const puppeteer = require('puppeteer');
|
|
|
|
process.env.CHROME_BIN = puppeteer.executablePath();
|
|
|
|
|
2018-07-27 10:18:29 -04:00
|
|
|
module.exports = function(config) {
|
|
|
|
config.set({
|
|
|
|
// base path, that will be used to resolve files and exclude
|
|
|
|
basePath: 'public/',
|
|
|
|
|
|
|
|
// testing framework to use (jasmine/mocha/qunit/...)
|
|
|
|
frameworks: ['jasmine'],
|
|
|
|
|
|
|
|
// list of files / patterns to load in the browser
|
|
|
|
files: [
|
2021-11-02 17:06:24 -04:00
|
|
|
'*.js',
|
2018-07-27 10:18:29 -04:00
|
|
|
//fixtures
|
|
|
|
{pattern: 'mocks/*.json', watched: true, served: true, included: false}
|
|
|
|
],
|
|
|
|
|
|
|
|
// list of files / patterns to exclude
|
|
|
|
exclude: [],
|
|
|
|
|
|
|
|
// web server port
|
|
|
|
port: 8080,
|
|
|
|
|
|
|
|
// level of logging
|
|
|
|
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
|
|
|
|
logLevel: config.LOG_INFO,
|
2021-10-15 15:06:04 -04:00
|
|
|
|
2018-07-27 10:18:29 -04:00
|
|
|
plugins: [
|
|
|
|
'karma-jasmine',
|
2019-05-13 14:10:08 -04:00
|
|
|
'karma-chrome-launcher',
|
2018-07-27 10:18:29 -04:00
|
|
|
'karma-mocha-reporter'
|
|
|
|
],
|
|
|
|
|
|
|
|
// reporter types:
|
|
|
|
// - dots
|
|
|
|
// - progress (default)
|
|
|
|
// - spec (karma-spec-reporter)
|
|
|
|
// - junit
|
|
|
|
// - growl
|
|
|
|
// - coverage
|
|
|
|
reporters: ['mocha'],
|
|
|
|
|
|
|
|
// enable / disable watching file and executing tests whenever any file changes
|
|
|
|
autoWatch: true,
|
|
|
|
|
|
|
|
// Start these browsers, currently available:
|
|
|
|
// - Chrome
|
|
|
|
// - ChromeCanary
|
|
|
|
// - Firefox
|
|
|
|
// - Opera
|
|
|
|
// - Safari (only Mac)
|
|
|
|
// - PhantomJS
|
|
|
|
// - IE (only Windows)
|
2021-10-15 15:06:04 -04:00
|
|
|
browsers: ['ChromeHeadlessNoSandbox'],
|
|
|
|
customLaunchers: {
|
|
|
|
ChromeHeadlessNoSandbox: {
|
|
|
|
base: 'ChromeHeadless',
|
|
|
|
flags: ['--no-sandbox']
|
|
|
|
}
|
|
|
|
},
|
2018-07-27 10:18:29 -04:00
|
|
|
|
|
|
|
// Continuous Integration mode
|
|
|
|
// if true, it capture browsers, run tests and exit
|
|
|
|
singleRun: true
|
|
|
|
});
|
|
|
|
};
|