File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 8
8
},
9
9
"keywords" : [],
10
10
"scripts" : {
11
- "test" : " echo \" Error: no test specified \" && exit 1 "
11
+ "test" : " node tests/runner "
12
12
},
13
13
"repository" : {
14
14
"type" : " git" ,
43
43
" ./addon/ng2/" ,
44
44
" ./node_modules/angular-project-draft/"
45
45
]
46
+ },
47
+ "devDependencies" : {
48
+ "glob" : " ^5.0.14" ,
49
+ "mocha" : " ^2.2.5"
46
50
}
47
51
}
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ var Mocha = require ( 'mocha' ) ;
4
+ var glob = require ( 'glob' ) ;
5
+
6
+ var root = 'tests/{unit,acceptance}' ;
7
+ var specFiles = glob . sync ( root + '/**/*.spec.js' ) ;
8
+ var mocha = new Mocha ( {
9
+ timeout : 5000 ,
10
+ reporter : 'spec'
11
+ } ) ;
12
+
13
+ specFiles . forEach ( mocha . addFile . bind ( mocha ) ) ;
14
+
15
+ mocha . run ( function ( failures ) {
16
+ process . on ( 'exit' , function ( ) {
17
+ process . exit ( failures ) ;
18
+ } ) ;
19
+ } ) ;
You can’t perform that action at this time.
0 commit comments