| 
									
										
										
										
											2016-10-04 20:39:20 -07: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
 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-06 09:13:25 +03:00
										 |  |  | const browserProvidersConf = require('../../browser-providers.conf'); | 
					
						
							|  |  |  | const {generateSeed} = require('../../tools/jasmine-seed-generator'); | 
					
						
							| 
									
										
										
										
											2016-06-21 10:35:42 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07:00
										 |  |  | // Karma configuration
 | 
					
						
							|  |  |  | module.exports = function(config) { | 
					
						
							|  |  |  |   config.set({ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-08 15:53:45 -08:00
										 |  |  |     basePath: '../../', | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |     frameworks: ['jasmine'], | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-06 09:13:25 +03:00
										 |  |  |     client: { | 
					
						
							|  |  |  |       jasmine: { | 
					
						
							|  |  |  |         random: true, | 
					
						
							|  |  |  |         seed: generateSeed('router/karma.conf'), | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07:00
										 |  |  |     files: [ | 
					
						
							|  |  |  |       // Polyfills.
 | 
					
						
							| 
									
										
										
										
											2016-08-26 02:28:36 +02:00
										 |  |  |       'node_modules/core-js/client/core.js', | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07:00
										 |  |  |       'node_modules/reflect-metadata/Reflect.js', | 
					
						
							| 
									
										
										
										
											2016-08-09 16:17:55 +02:00
										 |  |  |       'shims_for_IE.js', | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07: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-04-01 00:44:38 +09:00
										 |  |  |       'node_modules/zone.js/dist/zone-testing.js', | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-27 17:06:06 -05:00
										 |  |  |       {pattern: 'node_modules/rxjs/**/*', included: false, watched: false}, | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-21 10:35:42 -07:00
										 |  |  |       // shim
 | 
					
						
							| 
									
										
										
										
											2017-03-07 11:04:30 -08:00
										 |  |  |       {pattern: 'packages/router/karma-test-shim.js', included: true, watched: true}, | 
					
						
							| 
									
										
										
										
											2016-06-21 10:35:42 -07: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 13:22:57 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-21 10:35:42 -07: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 20:39:20 -07:00
										 |  |  |       { | 
					
						
							|  |  |  |         pattern: 'dist/all/@angular/platform-browser/testing/**/*.js', | 
					
						
							|  |  |  |         included: false, | 
					
						
							|  |  |  |         watched: false, | 
					
						
							|  |  |  |       }, | 
					
						
							| 
									
										
										
										
											2016-06-21 10:35:42 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |       {pattern: 'dist/all/@angular/platform-browser-dynamic/*.js', included: false, watched: false}, | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07: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 10:35:42 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |       // Router
 | 
					
						
							| 
									
										
										
										
											2016-06-21 14:07:36 -07:00
										 |  |  |       {pattern: 'dist/all/@angular/router/**/*.js', included: false, watched: true} | 
					
						
							| 
									
										
										
										
											2016-06-21 10:35:42 -07:00
										 |  |  |     ], | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-21 10:35:42 -07:00
										 |  |  |     customLaunchers: browserProvidersConf.customLaunchers, | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-21 10:35:42 -07:00
										 |  |  |     plugins: [ | 
					
						
							|  |  |  |       'karma-jasmine', | 
					
						
							|  |  |  |       'karma-browserstack-launcher', | 
					
						
							|  |  |  |       'karma-sauce-launcher', | 
					
						
							|  |  |  |       'karma-chrome-launcher', | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |       'karma-sourcemap-loader', | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07:00
										 |  |  |     ], | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-23 16:28:11 -07:00
										 |  |  |     preprocessors: { | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |       '**/*.js': ['sourcemap'], | 
					
						
							| 
									
										
										
										
											2016-05-23 16:28:11 -07:00
										 |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-26 16:50:45 -07:00
										 |  |  |     reporters: ['dots'], | 
					
						
							| 
									
										
										
										
											2016-05-20 13:22:57 -07:00
										 |  |  |     port: 9876, | 
					
						
							|  |  |  |     colors: true, | 
					
						
							|  |  |  |     logLevel: config.LOG_INFO, | 
					
						
							|  |  |  |     autoWatch: true, | 
					
						
							|  |  |  |     browsers: ['Chrome'], | 
					
						
							| 
									
										
										
										
											2016-08-09 16:17:55 +02:00
										 |  |  |     singleRun: false, | 
					
						
							|  |  |  |     captureTimeout: 60000, | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |     browserDisconnectTimeout: 60000, | 
					
						
							|  |  |  |     browserDisconnectTolerance: 3, | 
					
						
							|  |  |  |     browserNoActivityTimeout: 60000, | 
					
						
							| 
									
										
										
										
											2016-07-21 16:12:40 -07:00
										 |  |  |   }); | 
					
						
							| 
									
										
										
										
											2016-08-09 16:17:55 +02:00
										 |  |  | }; |