1
+ module . exports = function ( config ) {
2
+ config . set ( {
3
+ // base path that will be used to resolve all patterns (eg. files, exclude)
4
+ basePath : '' ,
5
+
6
+ // frameworks to use
7
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
8
+ frameworks : [ 'jasmine' ] ,
9
+
10
+ // list of files / patterns to load in the browser
11
+ files : [
12
+ 'spec.bundle.js'
13
+ ] ,
14
+
15
+ // list of files to exclude
16
+ exclude : [
17
+ ] ,
18
+
19
+ // preprocess matching files before serving them to the browser
20
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
21
+ preprocessors : {
22
+ 'spec.bundle.js' : [ 'webpack' , 'sourcemap' ]
23
+ } ,
24
+
25
+ webpack : {
26
+ resolve : {
27
+ root : __dirname ,
28
+ extensions : [ '' , '.ts' , '.js' , '.json' ]
29
+ } ,
30
+ devtool : 'inline-source-map' ,
31
+ module : {
32
+ loaders : [
33
+ { test : / \. t s $ / , loader : 'typescript-simple?ignoreWarnings[]=2304' , exclude : [
34
+ / w e b _ m o d u l e s / ,
35
+ / n o d e _ m o d u l e s /
36
+ ]
37
+ } ,
38
+ { test : / \. j s o n $ / , loader : 'json' } ,
39
+ { test : / \. h t m l $ / , loader : 'raw' } ,
40
+ { test : / \. c s s $ / , loader : 'raw' }
41
+ ]
42
+ } ,
43
+ stats : { colors : true , reasons : true } ,
44
+ debug : false
45
+ } ,
46
+
47
+ // test results reporter to use
48
+ // possible values: 'dots', 'progress'
49
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
50
+ reporters : [ 'progress' ] ,
51
+
52
+ // web server port
53
+ port : 9876 ,
54
+
55
+ // enable / disable colors in the output (reporters and logs)
56
+ colors : true ,
57
+
58
+ // level of logging
59
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
60
+ logLevel : config . LOG_INFO ,
61
+
62
+ // enable / disable watching file and executing tests whenever any file changes
63
+ autoWatch : false ,
64
+
65
+ // start these browsers
66
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
67
+ browsers : [ 'ChromeCanary' ] ,
68
+
69
+ // Continuous Integration mode
70
+ // if true, Karma captures browsers, runs the tests and exits
71
+ singleRun : true
72
+ } )
73
+ } ;
0 commit comments