| 
									
										
										
										
											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
 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-27 16:09:09 +01:00
										 |  |  | var browserProvidersConf = require('./browser-providers.conf.js'); | 
					
						
							| 
									
										
										
										
											2015-11-23 14:58:18 -08:00
										 |  |  | var internalAngularReporter = require('./tools/karma/reporter.js'); | 
					
						
							| 
									
										
										
										
											2015-06-02 16:29:09 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  | // Karma configuration
 | 
					
						
							|  |  |  | // Generated on Thu Sep 25 2014 11:52:02 GMT-0700 (PDT)
 | 
					
						
							|  |  |  | module.exports = function(config) { | 
					
						
							|  |  |  |   config.set({ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     frameworks: ['jasmine'], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     files: [ | 
					
						
							| 
									
										
										
										
											2014-10-06 17:35:00 -07:00
										 |  |  |       // Sources and specs.
 | 
					
						
							| 
									
										
										
										
											2015-08-20 17:05:05 +02:00
										 |  |  |       // Loaded through the System loader, in `test-main.js`.
 | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  |       {pattern: 'dist/all/@angular/**/*.js', included: false, watched: true}, | 
					
						
							| 
									
										
										
										
											2014-10-06 17:35:00 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-26 02:28:36 +02:00
										 |  |  |       'node_modules/core-js/client/core.js', | 
					
						
							| 
									
										
										
										
											2015-08-05 10:32:14 -07:00
										 |  |  |       // include Angular v1 for upgrade module testing
 | 
					
						
							| 
									
										
										
										
											2016-10-19 21:41:04 +01:00
										 |  |  |       'node_modules/angular/angular.js', | 
					
						
							| 
									
										
										
										
											2016-12-17 01:14:16 +02:00
										 |  |  |       'node_modules/angular-mocks/angular-mocks.js', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       'node_modules/zone.js/dist/zone.js', | 
					
						
							|  |  |  |       'node_modules/zone.js/dist/long-stack-trace-zone.js', | 
					
						
							|  |  |  |       'node_modules/zone.js/dist/proxy.js', | 
					
						
							|  |  |  |       'node_modules/zone.js/dist/sync-test.js', | 
					
						
							|  |  |  |       'node_modules/zone.js/dist/jasmine-patch.js', | 
					
						
							|  |  |  |       'node_modules/zone.js/dist/async-test.js', | 
					
						
							| 
									
										
										
										
											2016-04-18 16:04:35 -07:00
										 |  |  |       'node_modules/zone.js/dist/fake-async-test.js', | 
					
						
							| 
									
										
										
										
											2015-08-05 10:32:14 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-30 18:52:32 +01:00
										 |  |  |       // Including systemjs because it defines `__eval`, which produces correct stack traces.
 | 
					
						
							| 
									
										
										
										
											2016-12-17 01:14:16 +02:00
										 |  |  |       'shims_for_IE.js', | 
					
						
							|  |  |  |       'node_modules/systemjs/dist/system.src.js', | 
					
						
							| 
									
										
										
										
											2015-11-30 17:22:52 -08:00
										 |  |  |       {pattern: 'node_modules/rxjs/**', included: false, watched: false, served: true}, | 
					
						
							| 
									
										
										
										
											2016-12-17 01:14:16 +02:00
										 |  |  |       'node_modules/reflect-metadata/Reflect.js', | 
					
						
							|  |  |  |       'tools/build/file2modulename.js', | 
					
						
							|  |  |  |       'test-main.js', | 
					
						
							| 
									
										
										
										
											2017-03-15 13:40:24 -07:00
										 |  |  |       {pattern: 'dist/all/@angular/empty.*', included: false, watched: false}, | 
					
						
							| 
									
										
										
										
											2017-03-07 11:04:30 -08:00
										 |  |  |       {pattern: 'packages/platform-browser/test/static_assets/**', included: false, watched: false}, | 
					
						
							| 
									
										
										
										
											2016-12-17 01:14:16 +02:00
										 |  |  |       { | 
					
						
							| 
									
										
										
										
											2017-03-07 11:04:30 -08:00
										 |  |  |         pattern: 'packages/platform-browser/test/browser/static_assets/**', | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |         included: false, | 
					
						
							|  |  |  |         watched: false, | 
					
						
							|  |  |  |       } | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  |     ], | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  |     exclude: [ | 
					
						
							|  |  |  |       'dist/all/@angular/**/e2e_test/**', | 
					
						
							| 
									
										
										
										
											2016-12-12 10:49:17 -08:00
										 |  |  |       'dist/all/@angular/**/*node_only_spec.js', | 
					
						
							| 
									
										
										
										
											2016-09-09 16:54:26 -07:00
										 |  |  |       'dist/all/@angular/benchpress/**', | 
					
						
							| 
									
										
										
										
											2016-06-02 11:33:53 -07:00
										 |  |  |       'dist/all/@angular/compiler-cli/**', | 
					
						
							| 
									
										
										
										
											2016-11-14 17:37:47 -08:00
										 |  |  |       'dist/all/@angular/compiler/test/aot/**', | 
					
						
							| 
									
										
										
										
											2016-09-09 16:54:26 -07:00
										 |  |  |       'dist/all/@angular/examples/**/e2e_test/*', | 
					
						
							| 
									
										
										
										
											2016-11-22 09:10:23 -08:00
										 |  |  |       'dist/all/@angular/language-service/**', | 
					
						
							| 
									
										
										
										
											2017-05-19 11:50:33 -07:00
										 |  |  |       'dist/all/@angular/router/test/**', | 
					
						
							| 
									
										
										
										
											2017-07-16 10:47:46 -07:00
										 |  |  |       'dist/all/@angular/tsc-wrapped/**', | 
					
						
							| 
									
										
										
										
											2016-09-07 16:04:33 -07:00
										 |  |  |       'dist/all/@angular/platform-browser/testing/e2e_util.js', | 
					
						
							| 
									
										
										
										
											2016-09-09 16:54:26 -07:00
										 |  |  |       'dist/all/angular1_router.js', | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |       'dist/examples/**/e2e_test/**', | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  |     ], | 
					
						
							| 
									
										
										
										
											2015-01-08 10:02:23 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-27 16:09:09 +01:00
										 |  |  |     customLaunchers: browserProvidersConf.customLaunchers, | 
					
						
							| 
									
										
										
										
											2015-06-02 16:29:09 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-23 14:58:18 -08:00
										 |  |  |     plugins: [ | 
					
						
							|  |  |  |       'karma-jasmine', | 
					
						
							|  |  |  |       'karma-browserstack-launcher', | 
					
						
							|  |  |  |       'karma-sauce-launcher', | 
					
						
							|  |  |  |       'karma-chrome-launcher', | 
					
						
							|  |  |  |       'karma-sourcemap-loader', | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |       internalAngularReporter, | 
					
						
							| 
									
										
										
										
											2015-11-23 14:58:18 -08:00
										 |  |  |     ], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     preprocessors: { | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |       '**/*.js': ['sourcemap'], | 
					
						
							| 
									
										
										
										
											2015-11-23 14:58:18 -08:00
										 |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     reporters: ['internal-angular'], | 
					
						
							| 
									
										
										
										
											2015-06-02 16:29:09 +02:00
										 |  |  |     sauceLabs: { | 
					
						
							|  |  |  |       testName: 'Angular2', | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  |       retryLimit: 3, | 
					
						
							| 
									
										
										
										
											2015-06-02 16:29:09 +02:00
										 |  |  |       startConnect: false, | 
					
						
							|  |  |  |       recordVideo: false, | 
					
						
							|  |  |  |       recordScreenshots: false, | 
					
						
							| 
									
										
										
										
											2015-09-02 20:58:02 -07:00
										 |  |  |       options: { | 
					
						
							| 
									
										
										
										
											2016-05-09 16:47:26 -07:00
										 |  |  |         'selenium-version': '2.53.0', | 
					
						
							| 
									
										
										
										
											2015-09-02 20:58:02 -07:00
										 |  |  |         'command-timeout': 600, | 
					
						
							|  |  |  |         'idle-timeout': 600, | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |         'max-duration': 5400, | 
					
						
							| 
									
										
										
										
											2015-06-02 16:29:09 +02:00
										 |  |  |       } | 
					
						
							| 
									
										
										
										
											2014-09-29 14:20:23 -07:00
										 |  |  |     }, | 
					
						
							| 
									
										
										
										
											2015-06-02 16:29:09 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-27 16:09:09 +01:00
										 |  |  |     browserStack: { | 
					
						
							|  |  |  |       project: 'Angular2', | 
					
						
							|  |  |  |       startTunnel: false, | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  |       retryLimit: 3, | 
					
						
							| 
									
										
										
										
											2016-11-10 11:58:06 -08:00
										 |  |  |       timeout: 1800, | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |       pollingTimeout: 10000, | 
					
						
							| 
									
										
										
										
											2015-10-27 16:09:09 +01:00
										 |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-24 17:24:01 -07:00
										 |  |  |     browsers: ['Chrome'], | 
					
						
							| 
									
										
										
										
											2014-10-09 13:50:25 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-01 22:22:26 -07:00
										 |  |  |     port: 9876, | 
					
						
							| 
									
										
										
										
											2016-11-10 11:58:06 -08:00
										 |  |  |     captureTimeout: 180000, | 
					
						
							|  |  |  |     browserDisconnectTimeout: 180000, | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |     browserDisconnectTolerance: 3, | 
					
						
							| 
									
										
										
										
											2016-11-10 11:58:06 -08:00
										 |  |  |     browserNoActivityTimeout: 300000, | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  |   }); | 
					
						
							| 
									
										
										
										
											2015-06-02 16:29:09 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-27 16:09:09 +01:00
										 |  |  |   if (process.env.TRAVIS) { | 
					
						
							| 
									
										
										
										
											2016-10-04 20:39:20 -07:00
										 |  |  |     var buildId = | 
					
						
							|  |  |  |         'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')'; | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  |     if (process.env.CI_MODE.startsWith('saucelabs')) { | 
					
						
							| 
									
										
										
										
											2015-10-27 16:09:09 +01:00
										 |  |  |       config.sauceLabs.build = buildId; | 
					
						
							|  |  |  |       config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       // TODO(mlaval): remove once SauceLabs supports websockets.
 | 
					
						
							|  |  |  |       // This speeds up the capturing a bit, as browsers don't even try to use websocket.
 | 
					
						
							|  |  |  |       console.log('>>>> setting socket.io transport to polling <<<<'); | 
					
						
							|  |  |  |       config.transports = ['polling']; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2015-06-02 16:29:09 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  |     if (process.env.CI_MODE.startsWith('browserstack')) { | 
					
						
							| 
									
										
										
										
											2015-10-27 16:09:09 +01:00
										 |  |  |       config.browserStack.build = buildId; | 
					
						
							|  |  |  |       config.browserStack.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2015-06-02 16:29:09 +02:00
										 |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  | }; |