File tree 2 files changed +25
-3
lines changed
2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,16 @@ module.exports = function (grunt) {
163
163
dest : 'amd/<%= pkg.name %>.min.js'
164
164
}
165
165
} ,
166
+
167
+ karma : {
168
+ unit : {
169
+ configFile : 'karma.ci.js'
170
+ } ,
171
+ dev : {
172
+ configFile : 'karma.dev.js'
173
+ }
174
+ } ,
175
+
166
176
} ) ;
167
177
168
178
grunt . loadNpmTasks ( 'grunt-contrib-uglify' ) ;
@@ -173,6 +183,7 @@ module.exports = function (grunt) {
173
183
grunt . loadNpmTasks ( 'grunt-contrib-copy' ) ;
174
184
grunt . loadNpmTasks ( 'grunt-browserify' ) ;
175
185
grunt . loadNpmTasks ( 'grunt-contrib-requirejs' ) ;
186
+ grunt . loadNpmTasks ( 'grunt-karma' ) ;
176
187
177
188
grunt . registerTask ( 'build' , [
178
189
'clean:amd' ,
@@ -188,6 +199,16 @@ module.exports = function (grunt) {
188
199
'clean:transpiled'
189
200
] ) ;
190
201
202
+ grunt . registerTask ( 'test' , [
203
+ 'build' ,
204
+ 'karma:unit'
205
+ ] ) ;
206
+
207
+ grunt . registerTask ( 'test-watch' , [
208
+ 'build' ,
209
+ 'karma:dev'
210
+ ] ) ;
211
+
191
212
require ( './tools/release/tasks' ) ( grunt ) ;
192
213
193
214
grunt . registerTask ( 'default' , [ 'build' ] ) ;
Original file line number Diff line number Diff line change 9
9
"homepage" : " http://react-bootstrap.github.io/" ,
10
10
"scripts" : {
11
11
"build" : " ./node_modules/.bin/grunt build" ,
12
- "test-watch" : " ./node_modules/.bin/grunt watch 2>&1 >/dev/null & ./node_modules/karma/bin/karma start karma.dev.js " ,
13
- "test" : " ./node_modules/.bin/grunt build && ./node_modules/karma/bin/karma start karma.ci.js "
12
+ "test-watch" : " ./node_modules/.bin/grunt test- watch" ,
13
+ "test" : " ./node_modules/.bin/grunt test "
14
14
},
15
15
"main" : " lib/main.js" ,
16
16
"directories" : {
39
39
"grunt-contrib-requirejs" : " ~0.4.1" ,
40
40
"grunt-contrib-uglify" : " ~0.3.2" ,
41
41
"grunt-contrib-watch" : " ~0.5.3" ,
42
+ "grunt-karma" : " ^0.10.1" ,
42
43
"grunt-react" : " ~0.10.0" ,
43
44
"grunt-shell" : " ~0.6.4" ,
44
45
"karma" : " ~0.12.8" ,
62
63
"semver" : " ~2.0.7" ,
63
64
"sinon" : " ^1.10.3"
64
65
}
65
- }
66
+ }
You can’t perform that action at this time.
0 commit comments