redoc/karma.conf.js

48 lines
1.2 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,
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
}