Commit 5e54f3e 1 parent c9164ae commit 5e54f3e Copy full SHA for 5e54f3e
File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ module.exports = function(grunt) {
31
31
} ,
32
32
} ,
33
33
} ,
34
+ run : {
35
+ optionalInstall : {
36
+ exec : 'npm install --no-save --silent karma-phantomjs-launcher phantomjs-prebuilt' ,
37
+ } ,
38
+ } ,
34
39
eslint : {
35
40
gruntfile : {
36
41
src : 'Gruntfile.js' ,
@@ -211,6 +216,7 @@ module.exports = function(grunt) {
211
216
} ) ;
212
217
213
218
// These plugins provide necessary tasks.
219
+ grunt . loadNpmTasks ( 'grunt-run' ) ;
214
220
grunt . loadNpmTasks ( 'grunt-browserify' ) ;
215
221
grunt . loadNpmTasks ( 'grunt-contrib-uglify' ) ;
216
222
grunt . loadNpmTasks ( 'grunt-eslint' ) ;
@@ -236,12 +242,14 @@ module.exports = function(grunt) {
236
242
// Default task.
237
243
grunt . registerTask ( 'default' , [ 'browserify' ] ) ;
238
244
245
+ grunt . registerTask ( 'phantomTests' , [ 'run' , 'karma:unit-once' ] ) ;
246
+
239
247
grunt . registerTask ( 'test' , [
240
248
'eslint' ,
241
249
process . env . JENKINS_HOME ? 'mochaTest:unit-xml' : 'mochaTest:unit' ,
242
250
process . env . JENKINS_HOME && ( / ^ w i n / . test ( process . platform ) ||
243
251
/ ^ s 3 9 0 x / . test ( process . arch ) || / ^ p p c 6 4 / . test ( process . arch ) ) ?
244
- 'skip-karma' : 'karma:unit-once ' ,
252
+ 'skip-karma' : 'phantomTests ' ,
245
253
] ) ;
246
254
247
255
// alias for sl-ci-run and `npm test`
Original file line number Diff line number Diff line change 82
82
"grunt-eslint" : " ^21.0.0" ,
83
83
"grunt-karma" : " ^2.0.0" ,
84
84
"grunt-mocha-test" : " ^0.13.3" ,
85
+ "grunt-run" : " ^0.8.1" ,
85
86
"karma" : " ^1.1.2" ,
86
87
"karma-browserify" : " ^5.1.1" ,
87
88
"karma-chrome-launcher" : " ^1.0.1" ,
90
91
"karma-html2js-preprocessor" : " ^1.0.0" ,
91
92
"karma-junit-reporter" : " ~1.0.0" ,
92
93
"karma-mocha" : " ^1.1.1" ,
93
- "karma-phantomjs-launcher" : " ^1.0.0" ,
94
94
"karma-script-launcher" : " ^1.0.0" ,
95
95
"loopback-boot" : " ^2.7.0" ,
96
96
"loopback-context" : " ^1.0.0" ,
97
97
"mocha" : " ^5.2.0" ,
98
98
"nyc" : " ^10.1.2" ,
99
- "phantomjs-prebuilt" : " ^2.1.7" ,
100
99
"sinon" : " ^6.1.4" ,
101
100
"sinon-chai" : " ^3.2.0" ,
102
101
"strong-error-handler" : " ^3.0.0" ,
You can’t perform that action at this time.
0 commit comments