2015-12-10 00:46:27 +03:00
|
|
|
module.exports = function (config) {
|
2015-12-13 13:37:58 +03:00
|
|
|
var travis = process.env.TRAVIS;
|
2015-12-10 00:46:27 +03:00
|
|
|
config.set({
|
2015-12-18 11:34:17 +03:00
|
|
|
frameworks: ['phantomjs-shim', 'jspm', 'jasmine', 'sinon', 'should'],
|
2015-12-13 13:37:58 +03:00
|
|
|
preprocessors: {
|
2015-12-19 01:53:33 +03:00
|
|
|
'lib/**/!(*spec).js': ['babel', 'regex', 'coverage']
|
|
|
|
},
|
|
|
|
|
|
|
|
regexPreprocessor: {
|
|
|
|
rules: [
|
|
|
|
[ /'\.(.*?)\.css'/g, '\'.tmp$1.css\'']
|
|
|
|
]
|
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: {
|
|
|
|
'lib/**/!(*spec).js': 'isparta'
|
|
|
|
},
|
|
|
|
dir: 'coverage/',
|
|
|
|
reporters: [
|
|
|
|
{type: 'html'},
|
|
|
|
{type: 'text-summary'},
|
|
|
|
{type: 'lcov'}
|
|
|
|
]
|
|
|
|
},
|
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: [
|
2016-03-27 18:25:46 +03:00
|
|
|
'node_modules/zone.js/dist/zone.js',
|
2015-12-21 22:35:12 +03:00
|
|
|
'node_modules/zone.js/dist/jasmine-patch.js',
|
2016-03-27 18:25:46 +03:00
|
|
|
'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-02-11 14:38:44 +03:00
|
|
|
'./node_modules/reflect-metadata/Reflect.js'
|
2015-12-10 00:46:27 +03:00
|
|
|
],
|
|
|
|
|
|
|
|
jspm: {
|
|
|
|
config: 'system.config.js',
|
2016-02-11 14:38:44 +03:00
|
|
|
loadFiles: ['tests/setup.js', 'tests/helpers.js', 'tests/unit/*.spec.js', 'lib/**/*.js'],
|
2016-02-01 15:47:21 +03:00
|
|
|
serveFiles: ['tests/schemas/**/*.json','tests/schemas/**/*.yml', 'lib/**/*.html', '.tmp/lib/**/*.css'],
|
2015-12-10 00:46:27 +03:00
|
|
|
nocache: true
|
|
|
|
},
|
|
|
|
|
|
|
|
proxies: {
|
|
|
|
'/tests/': '/base/tests/',
|
2016-02-10 18:18:36 +03:00
|
|
|
'/lib/components/Redoc/redoc-loading-styles.css': '/base/.tmp/lib/components/Redoc/redoc-loading-styles.css',
|
2015-12-10 00:46:27 +03:00
|
|
|
'/lib/': '/base/lib/',
|
|
|
|
'/jspm_packages/': '/base/jspm_packages/',
|
|
|
|
'/node_modules/': '/base/node_modules/',
|
2015-12-19 01:53:33 +03:00
|
|
|
'/.tmp/': '/base/.tmp/'
|
2015-12-10 00:46:27 +03:00
|
|
|
},
|
2015-12-13 13:37:58 +03:00
|
|
|
reporters: travis ? ['mocha', 'coverage', 'coveralls'] : ['mocha', 'coverage'],
|
2015-12-10 00:46:27 +03:00
|
|
|
|
2015-12-24 18:11:04 +03:00
|
|
|
browsers: ['PhantomJS'],
|
2015-12-10 00:46:27 +03:00
|
|
|
|
|
|
|
browserNoActivityTimeout: 60000
|
|
|
|
});
|
|
|
|
}
|