@@ -7,53 +7,53 @@ var expect = require('code').expect;
77
88var asyncDone = require ( '../' ) ;
99
10- function success ( cb ) {
10+ function success ( cb ) {
1111 cb ( null , 2 ) ;
1212}
1313
14- function failure ( cb ) {
14+ function failure ( cb ) {
1515 cb ( new Error ( 'Callback Error' ) ) ;
1616}
1717
18- function neverDone ( ) {
18+ function neverDone ( ) {
1919 return 2 ;
2020}
2121
22- describe ( 'callbacks' , function ( ) {
22+ describe ( 'callbacks' , function ( ) {
2323
24- it ( 'should handle a successful callback' , function ( done ) {
25- asyncDone ( success , function ( err , result ) {
24+ it ( 'should handle a successful callback' , function ( done ) {
25+ asyncDone ( success , function ( err , result ) {
2626 expect ( result ) . to . equal ( 2 ) ;
2727 done ( err ) ;
2828 } ) ;
2929 } ) ;
3030
31- it ( 'should handle an errored callback' , function ( done ) {
32- asyncDone ( failure , function ( err ) {
31+ it ( 'should handle an errored callback' , function ( done ) {
32+ asyncDone ( failure , function ( err ) {
3333 expect ( err ) . to . be . instanceof ( Error ) ;
3434 done ( ) ;
3535 } ) ;
3636 } ) ;
3737
38- it ( 'a function that takes an argument but never calls callback' , function ( done ) {
39- asyncDone ( neverDone , function ( ) {
38+ it ( 'a function that takes an argument but never calls callback' , function ( done ) {
39+ asyncDone ( neverDone , function ( ) {
4040 done ( new Error ( 'Callback called' ) ) ;
4141 } ) ;
4242
43- setTimeout ( function ( ) {
43+ setTimeout ( function ( ) {
4444 done ( ) ;
4545 } , 1000 ) ;
4646 } ) ;
4747
48- it ( 'should not handle error if something throws inside the callback' , function ( done ) {
48+ it ( 'should not handle error if something throws inside the callback' , function ( done ) {
4949 var d = require ( 'domain' ) . create ( ) ;
50- d . on ( 'error' , function ( err ) {
50+ d . on ( 'error' , function ( err ) {
5151 expect ( err ) . to . be . instanceof ( Error ) ;
5252 done ( ) ;
5353 } ) ;
5454
55- d . run ( function ( ) {
56- asyncDone ( success , function ( ) {
55+ d . run ( function ( ) {
56+ asyncDone ( success , function ( ) {
5757 throw new Error ( 'Thrown Error' ) ;
5858 } ) ;
5959 } ) ;
0 commit comments