| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  | // Karma configuration
 | 
					
						
							|  |  |  | // Generated on Thu Sep 25 2014 11:52:02 GMT-0700 (PDT)
 | 
					
						
							| 
									
										
										
										
											2014-12-05 16:26:30 -08:00
										 |  |  | var file2moduleName = require('./tools/build/file2modulename'); | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | module.exports = function(config) { | 
					
						
							|  |  |  |   config.set({ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     frameworks: ['dart-unittest'], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     files: [ | 
					
						
							| 
									
										
										
										
											2014-09-30 16:55:59 -07:00
										 |  |  |       // Unit test files needs to be included.
 | 
					
						
							|  |  |  |       // Karma-dart generates `__adapter_unittest.dart` that imports these files.
 | 
					
						
							|  |  |  |       {pattern: 'modules/*/test/**/*_spec.js', included: true}, | 
					
						
							| 
									
										
										
										
											2014-09-28 13:55:01 -07:00
										 |  |  |       {pattern: 'tools/transpiler/spec/**/*_spec.js', included: true}, | 
					
						
							| 
									
										
										
										
											2014-09-30 16:55:59 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |       // These files are not included, they are imported by the unit tests above.
 | 
					
						
							|  |  |  |       {pattern: 'modules/**', included: false}, | 
					
						
							| 
									
										
										
										
											2014-09-28 13:55:01 -07:00
										 |  |  |       {pattern: 'tools/transpiler/spec/**/*', included: false}, | 
					
						
							| 
									
										
										
										
											2014-09-30 16:55:59 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |       // Dependencies, installed with `pub install`.
 | 
					
						
							|  |  |  |       {pattern: 'packages/**/*.dart', included: false, watched: false}, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       // Init and configure guiness.
 | 
					
						
							|  |  |  |       {pattern: 'test-main.dart', included: true} | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  |     ], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     karmaDartImports: { | 
					
						
							|  |  |  |       guinness: 'package:guinness/guinness_html.dart' | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-09 13:50:25 -07:00
										 |  |  |     // TODO(vojta): Remove the localhost:9877 from urls, once the proxy fix is merged:
 | 
					
						
							|  |  |  |     // https://github.com/karma-runner/karma/pull/1207
 | 
					
						
							|  |  |  |     //
 | 
					
						
							| 
									
										
										
										
											2014-09-30 16:55:59 -07:00
										 |  |  |     // Map packages to the correct urls where Karma serves them.
 | 
					
						
							|  |  |  |     proxies: { | 
					
						
							|  |  |  |       // Dependencies installed with `pub install`.
 | 
					
						
							| 
									
										
										
										
											2014-10-09 13:50:25 -07:00
										 |  |  |       '/packages/unittest': 'http://localhost:9877/base/packages/unittest', | 
					
						
							|  |  |  |       '/packages/guinness': 'http://localhost:9877/base/packages/guinness', | 
					
						
							|  |  |  |       '/packages/matcher': 'http://localhost:9877/base/packages/matcher', | 
					
						
							|  |  |  |       '/packages/stack_trace': 'http://localhost:9877/base/packages/stack_trace', | 
					
						
							|  |  |  |       '/packages/collection': 'http://localhost:9877/base/packages/collection', | 
					
						
							|  |  |  |       '/packages/path': 'http://localhost:9877/base/packages/path', | 
					
						
							| 
									
										
										
										
											2014-09-30 16:55:59 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |       // Local dependencies, transpiled from the source.
 | 
					
						
							| 
									
										
										
										
											2014-10-09 13:50:25 -07:00
										 |  |  |       '/packages/core': 'http://localhost:9877/base/modules/core/src', | 
					
						
							|  |  |  |       '/packages/change_detection': 'http://localhost:9877/base/modules/change_detection/src', | 
					
						
							| 
									
										
										
										
											2014-11-20 12:07:48 -08:00
										 |  |  |       '/packages/reflection': 'http://localhost:9877/base/modules/reflection/src', | 
					
						
							| 
									
										
										
										
											2014-10-09 13:50:25 -07:00
										 |  |  |       '/packages/di': 'http://localhost:9877/base/modules/di/src', | 
					
						
							| 
									
										
										
										
											2014-12-05 17:44:00 -08:00
										 |  |  |       '/packages/directives': 'http://localhost:9877/base/modules/directives/src', | 
					
						
							| 
									
										
										
										
											2014-10-09 13:50:25 -07:00
										 |  |  |       '/packages/facade': 'http://localhost:9877/base/modules/facade/src', | 
					
						
							|  |  |  |       '/packages/test_lib': 'http://localhost:9877/base/modules/test_lib/src', | 
					
						
							| 
									
										
										
										
											2014-09-30 16:55:59 -07:00
										 |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  |     preprocessors: { | 
					
						
							| 
									
										
										
										
											2014-09-28 13:55:01 -07:00
										 |  |  |       'modules/**/*.js': ['traceur'], | 
					
						
							|  |  |  |       'tools/**/*.js': ['traceur'] | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  |     }, | 
					
						
							| 
									
										
										
										
											2014-09-30 16:55:59 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  |     traceurPreprocessor: { | 
					
						
							|  |  |  |       options: { | 
					
						
							|  |  |  |         outputLanguage: 'dart', | 
					
						
							| 
									
										
										
										
											2014-10-30 18:52:32 +01:00
										 |  |  |         sourceMaps: true, | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  |         script: false, | 
					
						
							|  |  |  |         modules: 'register', | 
					
						
							| 
									
										
										
										
											2014-11-07 09:31:51 -08:00
										 |  |  |         memberVariables: true, | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  |         types: true, | 
					
						
							|  |  |  |         // typeAssertions: true,
 | 
					
						
							|  |  |  |         // typeAssertionModule: 'assert',
 | 
					
						
							|  |  |  |         annotations: true | 
					
						
							|  |  |  |       }, | 
					
						
							| 
									
										
										
										
											2014-09-28 13:55:01 -07:00
										 |  |  |       resolveModuleName: file2moduleName, | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  |       transformPath: function(fileName) { | 
					
						
							|  |  |  |         return fileName.replace('.js', '.dart'); | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-29 14:20:23 -07:00
										 |  |  |     customLaunchers: { | 
					
						
							|  |  |  |       DartiumWithWebPlatform: { | 
					
						
							|  |  |  |         base: 'Dartium', | 
					
						
							|  |  |  |         flags: ['--enable-experimental-web-platform-features'] } | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     browsers: ['DartiumWithWebPlatform'], | 
					
						
							| 
									
										
										
										
											2014-10-09 13:50:25 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |     port: 9877 | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-26 17:39:27 -07:00
										 |  |  |   config.plugins.push(require('./tools/transpiler/karma-traceur-preprocessor')); | 
					
						
							| 
									
										
										
										
											2014-09-25 14:04:46 -07:00
										 |  |  | }; |