File tree 3 files changed +12
-7
lines changed
3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,6 @@ addons:
14
14
install :
15
15
- export DISPLAY=':99.0'
16
16
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
17
- - npm install
17
+ - npm install
18
+ notifications :
19
+ slack : microbejs:HKzPLegwioqGdZrzZflUw0Tm
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ Change log
138
138
#### 0.4.13
139
139
140
140
+ added travi-ci testing
141
+ + added nightmare command line testing
141
142
142
143
143
144
#### 0.4.12
Original file line number Diff line number Diff line change @@ -5,18 +5,18 @@ var connect = require( 'connect' );
5
5
var serveStatic = require ( 'serve-static' ) ;
6
6
7
7
var server = connect ( ) . use ( serveStatic ( process . cwd ( ) ) ) . listen ( 8666 ) ;
8
-
9
- var errors ;
8
+ var tests ;
10
9
11
10
vo ( run ) ( function ( err , result )
12
11
{
12
+ console . log ( 'pass: ' + tests . pass + ', fail: ' + tests . fail ) ;
13
13
if ( err )
14
14
{
15
15
throw err ;
16
16
}
17
- else if ( errors !== 0 )
17
+ else if ( tests . fail !== 0 )
18
18
{
19
- throw new Error ( '\nthere were more than 0 errors (' + errors + ' to be exact)\n' ) ;
19
+ throw new Error ( '\nthere were more than 0 errors (' + tests . fail + ' to be exact)\n' ) ;
20
20
}
21
21
else
22
22
{
@@ -29,14 +29,16 @@ function *run()
29
29
{
30
30
var nightmare = Nightmare ( ) ;
31
31
32
- errors = yield nightmare
32
+ tests = yield nightmare
33
33
. on ( 'page-error' , function ( e ) { console . log ( e ) ; } )
34
34
. on ( 'page-log' , function ( e ) { console . log ( e ) ; } )
35
35
. goto ( 'http://localhost:8666/tests/' )
36
36
. wait ( '.pass' )
37
37
. evaluate ( function ( )
38
38
{
39
- return document . getElementsByClassName ( 'fail' ) . length ;
39
+ var pass = document . getElementsByClassName ( 'pass' ) . length ;
40
+ var fail = document . getElementsByClassName ( 'fail' ) . length ;
41
+ return { pass : pass , fail : fail } ;
40
42
} ) ;
41
43
42
44
server . close ( ) ;
You can’t perform that action at this time.
0 commit comments