redoc/karma.conf.js

52 lines
1.4 KiB
JavaScript
Raw Normal View History

2015-12-10 00:46:27 +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({
frameworks: ['phantomjs-shim', 'jasmine', 'sinon', 'should'],
preprocessors: {
'./tests/spec-bundle.js': ['coverage', 'webpack', 'sourcemap']
},
2015-12-10 00:46:27 +03:00
2016-08-28 21:46:10 +03:00
coverageReporter: {
type: 'in-memory'
},
remapCoverageReporter: {
'text-summary': null,
'text-lcov': './coverage/lcov.info',
'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',
state: true
2016-08-29 00:40:56 +03:00
},
2016-08-28 21:46:10 +03:00
client: {
chai: {
truncateThreshold: 0
}
},
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 },
{ pattern: 'lib/**/*.css', 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/',
'/node_modules/': '/base/node_modules/'
},
colors: true,
singleRun: true,
reporters: travis ? ['mocha', 'coverage', 'remap-coverage', 'coveralls'] : ['mocha', 'coverage', 'remap-coverage'],
2015-12-10 00:46:27 +03:00
2016-08-28 21:46:10 +03:00
browsers: ['PhantomJS'],
2015-12-10 00:46:27 +03:00
2016-08-28 21:46:10 +03:00
browserNoActivityTimeout: 60000
});
2015-12-10 00:46:27 +03:00
}