redoc/karma.conf.js

56 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: {
dir: 'coverage/',
reporters: [
{type: 'html'},
{type: 'lcov'},
{type: 'json'},
{type: 'text-summary'}
]
},
webpack: testWebpackConfig,
2016-08-29 00:40:56 +03:00
webpackMiddleware: {
stats: {
modules: false,
cached: false,
chunk: false
2016-08-29 07:43:59 +03:00
},
noInfo: 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', 'coveralls'] : ['mocha', '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
}