redoc/karma.conf.js

75 lines
2.5 KiB
JavaScript
Raw Normal View History

2015-12-10 00:46:27 +03:00
module.exports = function (config) {
config.set({
frameworks: ['phantomjs-shim', 'jspm', 'jasmine', 'sinon', 'should'],
2015-12-13 13:37:58 +03:00
preprocessors: {
2016-06-16 15:44:14 +03:00
'.tmp/lib/**/!(*spec).js': ['babel', 'coverage']
2015-12-13 13:37:58 +03:00
},
babelPreprocessor: {
options: {
sourceMap: 'inline',
"optional": [
"runtime",
"optimisation.modules.system",
"es7.decorators",
"es7.classProperties"
]
},
sourceFileName: function(file) {
return file.originalPath;
}
},
2015-12-10 00:46:27 +03:00
2015-12-13 13:37:58 +03:00
coverageReporter: {
instrumenters: { isparta : require('isparta') },
instrumenter: {
2016-06-16 15:44:14 +03:00
'.tmp/lib/**/!(*spec).js': 'isparta'
2015-12-13 13:37:58 +03:00
},
dir: 'coverage/',
reporters: [
{type: 'html'},
2016-06-16 15:44:14 +03:00
{type: 'lcov'},
{type: 'json'}
2015-12-13 13:37:58 +03:00
]
},
2015-12-12 22:45:57 +03:00
client: {
chai: {
truncateThreshold: 0
}
},
2015-12-10 00:46:27 +03:00
//load angular dependencies and browser polyfills
files: [
'node_modules/zone.js/dist/zone.js',
2016-04-30 00:45:53 +03:00
'node_modules/zone.js/dist/fake-async-test.js',
'node_modules/zone.js/dist/async-test.js',
2015-12-21 22:35:12 +03:00
'node_modules/zone.js/dist/jasmine-patch.js',
'node_modules/zone.js/dist/long-stack-trace-zone.js',
2015-12-10 00:46:27 +03:00
'node_modules/babel-polyfill/dist/polyfill.js',
2016-06-12 20:44:34 +03:00
'./node_modules/reflect-metadata/Reflect.js',
'.tmp/prismjs-bundle.js'
2015-12-10 00:46:27 +03:00
],
jspm: {
config: 'system.config.js',
2016-06-12 20:44:34 +03:00
loadFiles: ['.tmp/tests/setup.js', '.tmp/tests/helpers.js', '.tmp/lib/**/*.js',
'.tmp/tests/unit/*.js'],
serveFiles: ['tests/schemas/**/*.json','tests/schemas/**/*.yml', 'lib/**/*.html',
'.tmp/*js', '.tmp/lib/**/*.css']
2015-12-10 00:46:27 +03:00
},
proxies: {
2016-06-16 00:33:06 +03:00
'/.tmp/': '/base/.tmp/',
2016-06-12 20:44:34 +03:00
'/tests/schemas': '/base/tests/schemas',
'/lib/components/redoc/redoc-initial-styles.scss': '/base/.tmp/lib/components/Redoc/redoc-initial-styles.scss',
'/lib/version.json': '/base/.tmp/lib/version.json',
2015-12-10 00:46:27 +03:00
'/lib/': '/base/lib/',
'/jspm_packages/': '/base/jspm_packages/',
2016-06-16 00:33:06 +03:00
'/node_modules/': '/base/node_modules/'
2015-12-10 00:46:27 +03:00
},
2016-06-16 16:43:58 +03:00
reporters: ['mocha', 'coverage'],
2015-12-10 00:46:27 +03:00
browsers: ['PhantomJS'],
2015-12-10 00:46:27 +03:00
browserNoActivityTimeout: 60000
});
}