File tree 4 files changed +81
-4
lines changed
4 files changed +81
-4
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,6 @@ notifications:
9
9
email : false
10
10
install :
11
11
- npm install
12
- - npm install -g bower
13
- - bower install
12
+ script :
13
+ - npm run test
14
+ - npm run test-browser
Original file line number Diff line number Diff line change
1
+ // Karma configuration
2
+
3
+ module . exports = function ( config ) {
4
+ config . set ( {
5
+ // frameworks to use
6
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
7
+ frameworks : [ 'browserify' , 'mocha' ] ,
8
+
9
+
10
+ // list of files / patterns to load in the browser
11
+ files : [
12
+ 'test/**/*.js'
13
+ ] ,
14
+
15
+ preprocessors : {
16
+ 'test/**/*.js' : [ 'browserify' ]
17
+ } ,
18
+
19
+
20
+ // list of files to exclude
21
+ exclude : [ ] ,
22
+
23
+ plugins : [
24
+ 'karma-mocha' ,
25
+ 'karma-chrome-launcher' ,
26
+ 'karma-phantomjs-launcher' ,
27
+ 'karma-browserify' ,
28
+ 'karma-spec-reporter'
29
+ ] ,
30
+
31
+ browserify : {
32
+ debug : true
33
+ } ,
34
+
35
+
36
+ // test results reporter to use
37
+ // possible values: 'dots', 'progress'
38
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
39
+ reporters : [ 'spec' ] ,
40
+
41
+
42
+ // web server port
43
+ port : 9876 ,
44
+
45
+
46
+ // enable / disable colors in the output (reporters and logs)
47
+ colors : true ,
48
+
49
+
50
+ // level of logging
51
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
52
+ logLevel : config . LOG_INFO ,
53
+
54
+
55
+ // enable / disable watching file and executing tests whenever any file changes
56
+ autoWatch : true ,
57
+
58
+
59
+ // start these browsers
60
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
61
+ browsers : [ 'PhantomJS' ] ,
62
+
63
+
64
+ // Continuous Integration mode
65
+ // if true, Karma captures browsers, runs the tests and exits
66
+ singleRun : true
67
+ } ) ;
68
+ } ;
Original file line number Diff line number Diff line change 7
7
"compile" : " browserify -s Acl -r ./src/index.js -o ./dist/acl.js" ,
8
8
"bower" : " bower" ,
9
9
"test" : " mocha" ,
10
+ "test-browser" : " karma start" ,
10
11
"coverage" : " istanbul cover _mocha -- -u exports -R nyan"
11
12
},
12
13
"repository" : {
29
30
"browserify" : " ^13.0.1" ,
30
31
"chai" : " ^3.5.0" ,
31
32
"istanbul" : " ^0.4.3" ,
32
- "mocha" : " ^2.5.3"
33
+ "karma" : " ^0.13.22" ,
34
+ "karma-browserify" : " ^5.0.5" ,
35
+ "karma-chrome-launcher" : " ^0.2.0" ,
36
+ "karma-mocha" : " ^1.0.1" ,
37
+ "karma-phantomjs-launcher" : " ^0.2.1" ,
38
+ "karma-spec-reporter" : " 0.0.26" ,
39
+ "mocha" : " ^2.5.3" ,
40
+ "phantomjs" : " ^1.9.18"
33
41
}
34
42
}
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var Acl = require ( __dirname + '/ ../dist/acl ') ;
3
+ var Acl = require ( ' ../src ') ;
4
4
var expect = require ( 'chai' ) . expect ;
5
5
6
6
describe ( 'Acl' , function ( ) {
You can’t perform that action at this time.
0 commit comments