1
1
// #docregion
2
2
module . exports = function ( config ) {
3
3
4
- var appBase = 'app/' ; // transpiled app JS and map files
5
- var appSrcBase = 'app/' ; // app source TS files
4
+ var appBase = 'app/' ; // transpiled app JS and map files
5
+ var appSrcBase = 'app/' ; // app source TS files
6
6
var appAssets = 'base/app/' ; // component assets fetched by Angular's compiler
7
7
8
- var testBase = 'testing/' ; // transpiled test JS and map files
9
- var testSrcBase = 'testing/' ; // test source TS files
8
+ // Testing helpers (optional) are conventionally in a folder called `testing`
9
+ var testingBase = 'testing/' ; // transpiled test JS and map files
10
+ var testingSrcBase = 'testing/' ; // test source TS files
10
11
11
12
config . set ( {
12
13
basePath : '' ,
13
14
frameworks : [ 'jasmine' ] ,
15
+
14
16
plugins : [
15
17
require ( 'karma-jasmine' ) ,
16
18
require ( 'karma-chrome-launcher' ) ,
17
- require ( 'karma-jasmine-html-reporter' ) , // click "Debug" in browser to see it
18
- require ( 'karma-htmlfile-reporter' ) // crashing w/ strange socket error
19
+ require ( 'karma-jasmine-html-reporter' ) // click "Debug" in browser to see it
19
20
] ,
20
21
21
22
customLaunchers : {
@@ -26,6 +27,7 @@ module.exports = function(config) {
26
27
flags : [ '--no-sandbox' ]
27
28
}
28
29
} ,
30
+
29
31
files : [
30
32
// System.js for module loading
31
33
'node_modules/systemjs/dist/system.src.js' ,
@@ -58,7 +60,7 @@ module.exports = function(config) {
58
60
59
61
// transpiled application & spec code paths loaded via module imports
60
62
{ pattern : appBase + '**/*.js' , included : false , watched : true } ,
61
- { pattern : testBase + '**/*.js' , included : false , watched : true } ,
63
+ { pattern : testingBase + '**/*.js' , included : false , watched : true } ,
62
64
63
65
64
66
// Asset (HTML & CSS) paths loaded via Angular's component compiler
@@ -69,8 +71,8 @@ module.exports = function(config) {
69
71
// Paths for debugging with source maps in dev tools
70
72
{ pattern : appSrcBase + '**/*.ts' , included : false , watched : false } ,
71
73
{ pattern : appBase + '**/*.js.map' , included : false , watched : false } ,
72
- { pattern : testSrcBase + '**/*.ts' , included : false , watched : false } ,
73
- { pattern : testBase + '**/*.js.map' , included : false , watched : false }
74
+ { pattern : testingSrcBase + '**/*.ts' , included : false , watched : false } ,
75
+ { pattern : testingBase + '**/*.js.map' , included : false , watched : false }
74
76
] ,
75
77
76
78
// Proxied base paths for loading assets
@@ -81,18 +83,7 @@ module.exports = function(config) {
81
83
82
84
exclude : [ ] ,
83
85
preprocessors : { } ,
84
- // disabled HtmlReporter; suddenly crashing w/ strange socket error
85
- reporters : [ 'progress' , 'kjhtml' ] , //'html'],
86
-
87
- // HtmlReporter configuration
88
- htmlReporter : {
89
- // Open this file to see results in browser
90
- outputFile : '_test-output/tests.html' ,
91
-
92
- // Optional
93
- pageTitle : 'Unit Tests' ,
94
- subPageTitle : __dirname
95
- } ,
86
+ reporters : [ 'progress' , 'kjhtml' ] ,
96
87
97
88
port : 9876 ,
98
89
colors : true ,
0 commit comments