@@ -8,22 +8,49 @@ module.exports = function(config) {
88 frameworks : [ 'dart-unittest' ] ,
99
1010 files : [
11- { pattern : 'modules/**/*_spec.js' , included : true } ,
12- { pattern : 'modules/*/src/**/*' , included : false } ,
13- { pattern : 'modules/*/test/**/*' , included : false } ,
11+ // Unit test files needs to be included.
12+ // Karma-dart generates `__adapter_unittest.dart` that imports these files.
13+ { pattern : 'modules/*/test/**/*_spec.js ' , included : true } ,
1414 { pattern : 'tools/transpiler/spec/**/*_spec.js' , included : true } ,
15+
16+ // These files are not included, they are imported by the unit tests above.
17+ { pattern : 'modules/**' , included : false } ,
1518 { pattern : 'tools/transpiler/spec/**/*' , included : false } ,
16- 'test-main.dart'
19+
20+ // Dependencies, installed with `pub install`.
21+ { pattern : 'packages/**/*.dart' , included : false , watched : false } ,
22+
23+ // Init and configure guiness.
24+ { pattern : 'test-main.dart' , included : true }
1725 ] ,
1826
1927 karmaDartImports : {
2028 guinness : 'package:guinness/guinness_html.dart'
2129 } ,
2230
31+ // Map packages to the correct urls where Karma serves them.
32+ proxies : {
33+ // Dependencies installed with `pub install`.
34+ '/packages/unittest' : '/base/packages/unittest' ,
35+ '/packages/guinness' : '/base/packages/guinness' ,
36+ '/packages/matcher' : '/base/packages/matcher' ,
37+ '/packages/stack_trace' : '/base/packages/stack_trace' ,
38+ '/packages/collection' : '/base/packages/collection' ,
39+ '/packages/path' : '/base/packages/path' ,
40+
41+ // Local dependencies, transpiled from the source.
42+ '/packages/core' : '/base/modules/core/src' ,
43+ '/packages/change_detection' : '/base/modules/change_detection/src' ,
44+ '/packages/di' : '/base/modules/di/src' ,
45+ '/packages/facade' : '/base/modules/facade/src' ,
46+ '/packages/test_lib' : '/base/modules/test_lib/src' ,
47+ } ,
48+
2349 preprocessors : {
2450 'modules/**/*.js' : [ 'traceur' ] ,
2551 'tools/**/*.js' : [ 'traceur' ]
2652 } ,
53+
2754 traceurPreprocessor : {
2855 options : {
2956 outputLanguage : 'dart' ,
0 commit comments