File tree Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,14 @@ module.exports = {
36
36
'javascriptEnabled' : true ,
37
37
'acceptSslCerts' : true
38
38
}
39
+ } ,
40
+
41
+ 'phantomjs' : {
42
+ 'desiredCapabilities' : {
43
+ 'browserName' : 'phantomjs' ,
44
+ 'javascriptEnabled' : true ,
45
+ 'acceptSslCerts' : true
46
+ }
39
47
}
40
48
}
41
49
}
Original file line number Diff line number Diff line change 1
1
var path = require ( 'path' )
2
+ var spawn = require ( 'cross-spawn' )
2
3
var httpServer = require ( 'http-server' )
3
4
var server = httpServer . createServer ( {
4
5
root : path . resolve ( __dirname , '../../' )
5
6
} )
6
7
7
8
server . listen ( 8080 )
8
9
9
- var spawn = require ( 'cross-spawn' )
10
- var args = [
11
- '--config' , 'build/nightwatch.config.js' ,
12
- '--env' , 'chrome,firefox'
13
- ]
14
-
15
- if ( process . argv [ 2 ] ) {
16
- args . push ( '--test' , 'test/e2e/specs/' + process . argv [ 2 ] )
10
+ var args = process . argv . slice ( 2 )
11
+ if ( args . indexOf ( '--config' ) === - 1 ) {
12
+ args = args . concat ( [ '--config' , 'build/nightwatch.config.js' ] )
13
+ }
14
+ if ( args . indexOf ( '--env' ) === - 1 ) {
15
+ args = args . concat ( [ '--env' , 'chrome,firefox' ] )
16
+ }
17
+ var i = args . indexOf ( '--test' )
18
+ if ( i > - 1 ) {
19
+ args [ i + 1 ] = 'test/e2e/specs/' + args [ i + 1 ]
17
20
}
18
21
19
22
var runner = spawn ( './node_modules/.bin/nightwatch' , args , {
You can’t perform that action at this time.
0 commit comments