File tree Expand file tree Collapse file tree 4 files changed +77
-14
lines changed Expand file tree Collapse file tree 4 files changed +77
-14
lines changed Original file line number Diff line number Diff line change
1
+ browsers = [
2
+ //"Chrome",
3
+ "PhantomJS"
4
+ ] ;
5
+
6
+ module . exports = function ( config ) {
7
+ config . set ( {
8
+ basePath : '' ,
9
+ browsers : browsers ,
10
+ frameworks : [
11
+ 'browserify' ,
12
+ 'jasmine'
13
+ ] ,
14
+ files : [
15
+ 'src/**/*.js'
16
+ ] ,
17
+ exclude : [
18
+
19
+ ] ,
20
+ preprocessors : {
21
+ 'src/**/*.js' : [
22
+ 'browserify' ,
23
+ 'sourcemap' ,
24
+ 'coverage'
25
+ ]
26
+ } ,
27
+ browserify : {
28
+ debug : false ,
29
+ transform : [
30
+ 'babelify'
31
+ ]
32
+ } ,
33
+ reporters : [
34
+ 'progress' ,
35
+ 'coverage' ,
36
+ // 'coveralls'
37
+ ] ,
38
+ coverageReporter : {
39
+ instrumenters : { isparta : require ( 'isparta' ) } ,
40
+ instrumenter : {
41
+ '**/*.js' : 'isparta'
42
+ } ,
43
+
44
+ reporters : [
45
+ {
46
+ type : 'text' ,
47
+ dir : '.cover' ,
48
+ subdir : normalizationBrowserName
49
+ } ,
50
+ {
51
+ type : 'html' ,
52
+ dir : '.cover' ,
53
+ subdir : normalizationBrowserName
54
+ }
55
+ ]
56
+ }
57
+
58
+ } ) ;
59
+ } ;
60
+
61
+ function normalizationBrowserName ( browser ) {
62
+ return browser . toLowerCase ( ) . split ( / [ / - ] / ) [ 0 ] ;
63
+ }
Original file line number Diff line number Diff line change 1
1
browsers = [
2
- "Chrome" ,
3
- // "PhantomJS"
2
+ // "Chrome",
3
+ "PhantomJS"
4
4
] ;
5
5
6
6
module . exports = function ( config ) {
7
7
config . set ( {
8
+ singleRun : true ,
8
9
basePath : '' ,
9
10
browsers : browsers ,
10
11
frameworks : [
@@ -20,7 +21,7 @@ module.exports = function(config) {
20
21
preprocessors : {
21
22
'src/**/*.js' : [
22
23
'browserify' ,
23
- 'coverage'
24
+ 'sourcemap' ,
24
25
]
25
26
} ,
26
27
browserify : {
@@ -30,13 +31,7 @@ module.exports = function(config) {
30
31
]
31
32
} ,
32
33
reporters : [
33
- 'progress' ,
34
- 'coverage' ,
35
- 'coveralls'
36
- ] ,
37
- coverageReporter : {
38
- type : 'lcov' ,
39
- dir : '.cover/'
40
- }
34
+ 'progress'
35
+ ]
41
36
} ) ;
42
37
} ;
Original file line number Diff line number Diff line change 1
1
test : karma
2
2
3
3
karma :
4
- @./node_modules/.bin/karma start .karma.js --single-run --reporters progress -- log-level disable
4
+ @./node_modules/.bin/karma start .karma.js --log-level disable
5
5
6
6
cover :
7
- @./node_modules/.bin/karma start .karma.js --single-run
7
+ @rm -rf .cover
8
+ @./node_modules/.bin/karma start .karma.coverage.js --single-run
8
9
9
10
karma-watch :
10
11
./node_modules/.bin/karma start .karma.js --reporters progress --log-level disable
Original file line number Diff line number Diff line change 30
30
"eslint-plugin-import" : " ^1.16.0" ,
31
31
"eslint-plugin-jsx-a11y" : " ^2.2.2" ,
32
32
"eslint-plugin-react" : " ^6.3.0" ,
33
+ "isparta" : " ^4.0.0" ,
34
+ "istanbul" : " gotwarlost/istanbul#source-map" ,
33
35
"jasmine-core" : " ^2.5.2" ,
34
36
"karma" : " ^1.3.0" ,
37
+ "karma-babel-preprocessor" : " ^6.0.1" ,
35
38
"karma-browserify" : " ^5.1.0" ,
36
39
"karma-chrome-launcher" : " ^2.0.0" ,
37
- "karma-coverage" : " ^1.1.1 " ,
40
+ "karma-coverage" : " douglasduteil/karma-coverage#next " ,
38
41
"karma-coveralls" : " ^1.1.2" ,
39
42
"karma-jasmine" : " ^1.0.2" ,
40
43
"karma-phantomjs-launcher" : " ^1.0.2" ,
44
+ "karma-sourcemap-loader" : " ^0.3.7" ,
41
45
"uglify-js" : " ^2.7.3" ,
42
46
"watchify" : " ^3.7.0"
43
47
},
You can’t perform that action at this time.
0 commit comments