2016-06-21 13:35:42 -04:00
|
|
|
var browserProvidersConf = require('../../../browser-providers.conf.js');
|
|
|
|
|
2016-05-20 16:22:57 -04:00
|
|
|
// Karma configuration
|
|
|
|
module.exports = function(config) {
|
|
|
|
config.set({
|
|
|
|
|
2016-06-21 13:35:42 -04:00
|
|
|
basePath: '../../../',
|
2016-05-20 16:22:57 -04:00
|
|
|
|
|
|
|
frameworks: ['jasmine'],
|
|
|
|
|
|
|
|
files: [
|
|
|
|
// Polyfills.
|
|
|
|
'node_modules/es6-shim/es6-shim.js',
|
|
|
|
'node_modules/reflect-metadata/Reflect.js',
|
2016-08-09 10:17:55 -04:00
|
|
|
'shims_for_IE.js',
|
2016-05-20 16:22:57 -04:00
|
|
|
|
|
|
|
// System.js for module loading
|
|
|
|
'node_modules/systemjs/dist/system-polyfills.js',
|
|
|
|
'node_modules/systemjs/dist/system.src.js',
|
|
|
|
|
|
|
|
// Zone.js dependencies
|
|
|
|
'node_modules/zone.js/dist/zone.js',
|
2016-05-24 16:23:05 -04:00
|
|
|
'node_modules/zone.js/dist/long-stack-trace-zone.js',
|
2016-08-19 17:35:26 -04:00
|
|
|
'node_modules/zone.js/dist/proxy.js',
|
2016-08-19 15:10:53 -04:00
|
|
|
'node_modules/zone.js/dist/sync-test.js',
|
2016-05-20 16:22:57 -04:00
|
|
|
'node_modules/zone.js/dist/jasmine-patch.js',
|
|
|
|
'node_modules/zone.js/dist/async-test.js',
|
2016-05-24 16:23:05 -04:00
|
|
|
'node_modules/zone.js/dist/fake-async-test.js',
|
2016-05-20 16:22:57 -04:00
|
|
|
|
|
|
|
// RxJs.
|
|
|
|
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
|
|
|
|
{ pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
|
|
|
|
|
2016-06-21 13:35:42 -04:00
|
|
|
// shim
|
|
|
|
{pattern: 'modules/@angular/router/karma-test-shim.js', included: true, watched: true },
|
|
|
|
|
|
|
|
// Angular modules
|
|
|
|
{pattern: 'dist/all/@angular/core/*.js', included: false, watched: false},
|
|
|
|
{pattern: 'dist/all/@angular/core/src/**/*.js', included: false, watched: false},
|
|
|
|
{pattern: 'dist/all/@angular/core/testing/**/*.js', included: false, watched: false},
|
|
|
|
|
|
|
|
{pattern: 'dist/all/@angular/common/*.js', included: false, watched: false},
|
|
|
|
{pattern: 'dist/all/@angular/common/src/**/*.js', included: false, watched: false},
|
|
|
|
{pattern: 'dist/all/@angular/common/testing/**/*.js', included: false, watched: false},
|
2016-05-20 16:22:57 -04:00
|
|
|
|
2016-06-21 13:35:42 -04:00
|
|
|
{pattern: 'dist/all/@angular/compiler/*.js', included: false, watched: false},
|
|
|
|
{pattern: 'dist/all/@angular/compiler/src/**/*.js', included: false, watched: false},
|
|
|
|
{pattern: 'dist/all/@angular/compiler/testing/**/*.js', included: false, watched: false},
|
|
|
|
|
|
|
|
{pattern: 'dist/all/@angular/platform-browser/*.js', included: false, watched: false},
|
|
|
|
{pattern: 'dist/all/@angular/platform-browser/src/**/*.js', included: false, watched: false},
|
|
|
|
{pattern: 'dist/all/@angular/platform-browser/testing/**/*.js', included: false, watched: false},
|
|
|
|
|
|
|
|
{pattern: 'dist/all/@angular/platform-browser-dynamic/*.js', included: false, watched: false},
|
|
|
|
{pattern: 'dist/all/@angular/platform-browser-dynamic/src/**/*.js', included: false, watched: false},
|
|
|
|
{pattern: 'dist/all/@angular/platform-browser-dynamic/testing/**/*.js', included: false, watched: false},
|
|
|
|
|
|
|
|
// Router
|
2016-06-21 17:07:36 -04:00
|
|
|
{pattern: 'dist/all/@angular/router/**/*.js', included: false, watched: true}
|
2016-06-21 13:35:42 -04:00
|
|
|
],
|
2016-05-20 16:22:57 -04:00
|
|
|
|
2016-06-21 13:35:42 -04:00
|
|
|
customLaunchers: browserProvidersConf.customLaunchers,
|
2016-05-20 16:22:57 -04:00
|
|
|
|
2016-06-21 13:35:42 -04:00
|
|
|
plugins: [
|
|
|
|
'karma-jasmine',
|
|
|
|
'karma-browserstack-launcher',
|
|
|
|
'karma-sauce-launcher',
|
|
|
|
'karma-chrome-launcher',
|
|
|
|
'karma-sourcemap-loader'
|
2016-05-20 16:22:57 -04:00
|
|
|
],
|
|
|
|
|
2016-05-23 19:28:11 -04:00
|
|
|
preprocessors: {
|
|
|
|
'**/*.js': ['sourcemap']
|
|
|
|
},
|
|
|
|
|
2016-05-26 19:50:45 -04:00
|
|
|
reporters: ['dots'],
|
2016-05-20 16:22:57 -04:00
|
|
|
port: 9876,
|
|
|
|
colors: true,
|
|
|
|
logLevel: config.LOG_INFO,
|
|
|
|
autoWatch: true,
|
|
|
|
browsers: ['Chrome'],
|
2016-08-09 10:17:55 -04:00
|
|
|
singleRun: false,
|
|
|
|
captureTimeout: 60000,
|
|
|
|
browserDisconnectTimeout : 60000,
|
|
|
|
browserDisconnectTolerance : 3,
|
|
|
|
browserNoActivityTimeout : 60000
|
2016-07-21 19:12:40 -04:00
|
|
|
});
|
2016-08-09 10:17:55 -04:00
|
|
|
};
|