2016-10-04 23:39:20 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2017-03-08 18:53:45 -05:00
|
|
|
var browserProvidersConf = require('../../browser-providers.conf.js');
|
2016-06-21 13:35:42 -04:00
|
|
|
|
2016-05-20 16:22:57 -04:00
|
|
|
// Karma configuration
|
|
|
|
module.exports = function(config) {
|
|
|
|
config.set({
|
|
|
|
|
2017-03-08 18:53:45 -05:00
|
|
|
basePath: '../../',
|
2016-05-20 16:22:57 -04:00
|
|
|
|
|
|
|
frameworks: ['jasmine'],
|
|
|
|
|
|
|
|
files: [
|
|
|
|
// Polyfills.
|
2016-08-25 20:28:36 -04:00
|
|
|
'node_modules/core-js/client/core.js',
|
2016-05-20 16:22:57 -04:00
|
|
|
'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',
|
2018-03-31 11:44:38 -04:00
|
|
|
'node_modules/zone.js/dist/zone-testing.js',
|
2016-05-20 16:22:57 -04:00
|
|
|
|
2018-02-27 17:06:06 -05:00
|
|
|
{pattern: 'node_modules/rxjs/**/*', included: false, watched: false},
|
2016-05-20 16:22:57 -04:00
|
|
|
|
2016-06-21 13:35:42 -04:00
|
|
|
// shim
|
2017-03-07 14:04:30 -05:00
|
|
|
{pattern: 'packages/router/karma-test-shim.js', included: true, watched: true},
|
2016-06-21 13:35:42 -04:00
|
|
|
|
|
|
|
// 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},
|
2016-10-04 23:39:20 -04:00
|
|
|
{
|
|
|
|
pattern: 'dist/all/@angular/platform-browser/testing/**/*.js',
|
|
|
|
included: false,
|
|
|
|
watched: false,
|
|
|
|
},
|
2016-06-21 13:35:42 -04:00
|
|
|
|
|
|
|
{pattern: 'dist/all/@angular/platform-browser-dynamic/*.js', included: false, watched: false},
|
2016-10-04 23:39:20 -04:00
|
|
|
{
|
|
|
|
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,
|
|
|
|
},
|
2016-06-21 13:35:42 -04:00
|
|
|
|
|
|
|
// 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',
|
2016-10-04 23:39:20 -04:00
|
|
|
'karma-sourcemap-loader',
|
2016-05-20 16:22:57 -04:00
|
|
|
],
|
|
|
|
|
2016-05-23 19:28:11 -04:00
|
|
|
preprocessors: {
|
2016-10-04 23:39:20 -04:00
|
|
|
'**/*.js': ['sourcemap'],
|
2016-05-23 19:28:11 -04:00
|
|
|
},
|
|
|
|
|
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,
|
2016-10-04 23:39:20 -04:00
|
|
|
browserDisconnectTimeout: 60000,
|
|
|
|
browserDisconnectTolerance: 3,
|
|
|
|
browserNoActivityTimeout: 60000,
|
2016-07-21 19:12:40 -04:00
|
|
|
});
|
2016-08-09 10:17:55 -04:00
|
|
|
};
|