@@ -33,18 +33,18 @@ var cache = {
3333} ;
3434
3535
36- dotest . add ( 'account.status' , function ( ) {
36+ dotest . add ( 'account.status' , function ( test ) {
3737 gtmetrix . account . status ( function ( err , data ) {
38- dotest . test ( err )
38+ test ( err )
3939 . isObject ( 'fail' , 'data' , data )
4040 . done ( ) ;
4141 } ) ;
4242} ) ;
4343
4444
45- dotest . add ( 'browsers.list' , function ( ) {
45+ dotest . add ( 'browsers.list' , function ( test ) {
4646 gtmetrix . browsers . list ( function ( err , data ) {
47- dotest . test ( err )
47+ test ( err )
4848 . isArray ( 'fail' , 'data' , data )
4949 . isNotEmpty ( 'fail' , 'data' , data )
5050 . isObject ( 'warn' , 'data[0]' , data && data [ 0 ] )
@@ -53,19 +53,19 @@ dotest.add ('browsers.list', function () {
5353} ) ;
5454
5555
56- dotest . add ( 'browsers.get' , function ( ) {
56+ dotest . add ( 'browsers.get' , function ( test ) {
5757 gtmetrix . browsers . get ( 3 , function ( err , data ) {
58- dotest . test ( err )
58+ test ( err )
5959 . isObject ( 'fail' , 'data' , data )
6060 . isExactly ( 'warn' , 'data.id' , data && data . id , 3 )
6161 . done ( ) ;
6262 } ) ;
6363} ) ;
6464
6565
66- dotest . add ( 'locations.list' , function ( ) {
66+ dotest . add ( 'locations.list' , function ( test ) {
6767 gtmetrix . locations . list ( function ( err , data ) {
68- dotest . test ( err )
68+ test ( err )
6969 . isArray ( 'fail' , 'data' , data )
7070 . isNotEmpty ( 'fail' , 'data' , data )
7171 . isObject ( 'warn' , 'data[0]' , data && data [ 0 ] )
@@ -74,46 +74,46 @@ dotest.add ('locations.list', function () {
7474} ) ;
7575
7676
77- dotest . add ( 'test.create' , function ( ) {
77+ dotest . add ( 'test.create' , function ( test ) {
7878 gtmetrix . test . create ( cache , function ( err , data ) {
7979 cache = data ;
80- dotest . test ( err )
80+ test ( err )
8181 . isObject ( 'fail' , 'data' , data )
8282 . done ( ) ;
8383 } ) ;
8484} ) ;
8585
8686
87- dotest . add ( 'test.get - without polling' , function ( ) {
87+ dotest . add ( 'test.get - without polling' , function ( test ) {
8888 gtmetrix . test . get ( cache . test_id , function ( err , data ) {
89- dotest . test ( err )
89+ test ( err )
9090 . isObject ( 'fail' , 'data' , data )
9191 . isString ( 'warn' , 'data.state' , data && data . state )
9292 . done ( ) ;
9393 } ) ;
9494} ) ;
9595
9696
97- dotest . add ( 'test.get - with polling' , function ( ) {
97+ dotest . add ( 'test.get - with polling' , function ( test ) {
9898 gtmetrix . test . get ( cache . test_id , 5000 , function ( err , data ) {
99- dotest . test ( err )
99+ test ( err )
100100 . isObject ( 'fail' , 'data' , data )
101101 . isExactly ( 'fail' , 'data.state' , data && data . state , 'completed' )
102102 . done ( ) ;
103103 } ) ;
104104} ) ;
105105
106106
107- dotest . add ( 'test.get resource - binary with polling' , function ( ) {
107+ dotest . add ( 'test.get resource - binary with polling' , function ( test ) {
108108 gtmetrix . test . get ( cache . test_id , 'screenshot' , 5000 , function ( err , data ) {
109- dotest . test ( err )
109+ test ( err )
110110 . isObject ( 'fail' , 'data' , data )
111111 . done ( ) ;
112112 } ) ;
113113} ) ;
114114
115115
116- dotest . add ( 'Error: request failed (timeout)' , function ( ) {
116+ dotest . add ( 'Error: request failed (timeout)' , function ( test ) {
117117 var tmp = app ( {
118118 email : email ,
119119 apikey : apikey ,
@@ -123,7 +123,7 @@ dotest.add ('Error: request failed (timeout)', function () {
123123 tmp . account . status ( function ( err , data ) {
124124 var error = err && err . error ;
125125
126- dotest . test ( )
126+ test ( )
127127 . isError ( 'fail' , 'err' , err )
128128 . isExactly ( 'fail' , 'err.message' , err && err . message , 'request failed' )
129129 . isError ( 'fail' , 'err.error' , error )
0 commit comments