2017-09-21 11:51:33 +03:00
|
|
|
module.exports = function(config) {
|
2016-08-28 21:46:10 +03:00
|
|
|
const testWebpackConfig = require('./build/webpack.test.js');
|
|
|
|
const travis = process.env.TRAVIS;
|
2015-12-10 00:46:27 +03:00
|
|
|
|
2016-08-28 21:46:10 +03:00
|
|
|
config.set({
|
2017-09-21 11:51:33 +03:00
|
|
|
frameworks: ['jasmine', 'sinon', 'should'],
|
2016-08-28 21:46:10 +03:00
|
|
|
preprocessors: {
|
2017-09-21 11:51:33 +03:00
|
|
|
'./tests/spec-bundle.js': ['coverage', 'webpack', 'sourcemap'],
|
2016-08-28 21:46:10 +03:00
|
|
|
},
|
2015-12-10 00:46:27 +03:00
|
|
|
|
2016-08-28 21:46:10 +03:00
|
|
|
coverageReporter: {
|
2017-09-21 11:51:33 +03:00
|
|
|
type: 'in-memory',
|
2017-01-06 22:38:04 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
remapCoverageReporter: {
|
|
|
|
'text-summary': null,
|
|
|
|
'text-lcov': './coverage/lcov.info',
|
2017-09-21 11:51:33 +03:00
|
|
|
html: './coverage/html',
|
2016-08-28 21:46:10 +03:00
|
|
|
},
|
|
|
|
webpack: testWebpackConfig,
|
2016-08-29 00:40:56 +03:00
|
|
|
webpackMiddleware: {
|
2016-08-29 12:05:44 +03:00
|
|
|
stats: 'errors-only',
|
2017-09-21 11:51:33 +03:00
|
|
|
state: true,
|
2016-08-29 00:40:56 +03:00
|
|
|
},
|
2016-08-28 21:46:10 +03:00
|
|
|
client: {
|
|
|
|
chai: {
|
2017-09-21 11:51:33 +03:00
|
|
|
truncateThreshold: 0,
|
|
|
|
},
|
2016-08-28 21:46:10 +03:00
|
|
|
},
|
|
|
|
files: [
|
|
|
|
{ pattern: './tests/spec-bundle.js', watched: false },
|
|
|
|
{ pattern: 'tests/schemas/**/*.json', included: false },
|
|
|
|
{ pattern: 'tests/schemas/**/*.yml', included: false },
|
|
|
|
{ pattern: 'lib/**/*.html', included: false },
|
|
|
|
],
|
2015-12-10 00:46:27 +03:00
|
|
|
|
2016-08-28 21:46:10 +03:00
|
|
|
proxies: {
|
|
|
|
'/tests/schemas': '/base/tests/schemas',
|
|
|
|
'/lib/': '/base/lib/',
|
2017-09-21 11:51:33 +03:00
|
|
|
'/node_modules/': '/base/node_modules/',
|
2016-08-28 21:46:10 +03:00
|
|
|
},
|
|
|
|
colors: true,
|
|
|
|
singleRun: true,
|
2017-09-21 11:51:33 +03:00
|
|
|
reporters: travis
|
|
|
|
? ['mocha', 'coverage', 'remap-coverage', 'coveralls']
|
|
|
|
: ['mocha', 'coverage', 'remap-coverage'],
|
2015-12-10 00:46:27 +03:00
|
|
|
|
2018-01-21 22:57:48 +03:00
|
|
|
browsers: ['ChromeHeadlessNoSandbox'],
|
|
|
|
customLaunchers: {
|
|
|
|
ChromeHeadlessNoSandbox: {
|
|
|
|
base: 'ChromeHeadless',
|
|
|
|
flags: ['--no-sandbox']
|
|
|
|
}
|
|
|
|
},
|
2015-12-10 00:46:27 +03:00
|
|
|
|
2017-09-21 11:51:33 +03:00
|
|
|
browserNoActivityTimeout: 60000,
|
2016-08-28 21:46:10 +03:00
|
|
|
});
|
2017-09-21 11:51:33 +03:00
|
|
|
};
|