@@ -39,21 +39,23 @@ function normalize(result) {
3939 return result ;
4040}
4141
42+ var options = { timeout : 1000 * 30 } ;
43+
4244test ( 'documentation binary' , function ( t ) {
4345 documentation ( [ 'fixture/simple.input.js' ] , function ( err , data ) {
4446 t . error ( err ) ;
4547 t . equal ( data . length , 1 , 'simple has no dependencies' ) ;
4648 t . end ( ) ;
4749 } ) ;
48- } ) ;
50+ } , options ) ;
4951
5052test ( 'defaults to parsing package.json main' , function ( t ) {
5153 documentation ( [ ] , { cwd : path . join ( __dirname , '..' ) } , function ( err , data ) {
5254 t . error ( err ) ;
5355 t . ok ( data . length , 'we document ourself' ) ;
5456 t . end ( ) ;
5557 } ) ;
56- } ) ;
58+ } , options ) ;
5759
5860test ( 'accepts config file' , function ( t ) {
5961 documentation ( [ 'fixture/sorting/input.js -c fixture/config.json' ] ,
@@ -75,22 +77,22 @@ test('accepts config file', function (t) {
7577 'respected sort order from config file' ) ;
7678 t . end ( ) ;
7779 } ) ;
78- } ) ;
80+ } , options ) ;
7981
8082test ( '--shallow option' , function ( t ) {
8183 documentation ( [ '--shallow fixture/internal.input.js' ] , function ( err , data ) {
8284 t . error ( err ) ;
8385 t . equal ( data . length , 0 , 'should not check dependencies' ) ;
8486 t . end ( ) ;
8587 } ) ;
86- } ) ;
88+ } , options ) ;
8789
8890test ( 'bad -f option' , function ( t ) {
8991 documentation ( [ '-f DOES-NOT-EXIST fixture/internal.input.js' ] , function ( err ) {
9092 t . ok ( err , 'returns error' ) ;
9193 t . end ( ) ;
9294 } ) ;
93- } ) ;
95+ } , options ) ;
9496
9597test ( 'html with no destination' , function ( t ) {
9698 documentation ( [ '-f html fixture/internal.input.js' ] , function ( err ) {
@@ -99,7 +101,7 @@ test('html with no destination', function (t) {
99101 'needs dest for html' ) ;
100102 t . end ( ) ;
101103 } ) ;
102- } ) ;
104+ } , options ) ;
103105
104106test ( '--lint option' , function ( t ) {
105107 documentation ( [ '--lint fixture/lint/lint.input.js' ] , function ( err , data ) {
@@ -112,15 +114,15 @@ test('--lint option', function (t) {
112114 t . equal ( data , fs . readFileSync ( output , 'utf8' ) , 'outputs lint' ) ;
113115 t . end ( ) ;
114116 } ) ;
115- } ) ;
117+ } , options ) ;
116118
117119test ( '--lint option on good file' , function ( t ) {
118120 documentation ( [ '--lint fixture/simple.input.js' ] , { } , function ( err , data ) {
119121 t . equal ( err , null ) ;
120122 t . equal ( data , '' , 'no output' ) ;
121123 t . end ( ) ;
122124 } , false ) ;
123- } ) ;
125+ } , options ) ;
124126
125127test ( 'given no files' , function ( t ) {
126128 documentation ( [ '' ] , function ( err ) {
@@ -129,7 +131,7 @@ test('given no files', function (t) {
129131 'no files given' ) ;
130132 t . end ( ) ;
131133 } ) ;
132- } ) ;
134+ } , options ) ;
133135
134136test ( 'write to file' , function ( t ) {
135137
@@ -141,7 +143,7 @@ test('write to file', function (t) {
141143 t . ok ( fs . existsSync ( dst ) , 'created file' ) ;
142144 t . end ( ) ;
143145 } , false ) ;
144- } ) ;
146+ } , options ) ;
145147
146148test ( 'write to html' , function ( t ) {
147149
@@ -155,7 +157,7 @@ test('write to html', function (t) {
155157 t . ok ( fs . existsSync ( path . join ( dstDir , 'index.html' ) ) , 'created index.html' ) ;
156158 t . end ( ) ;
157159 } , false ) ;
158- } ) ;
160+ } , options ) ;
159161
160162test ( 'fatal error' , function ( t ) {
161163
@@ -164,4 +166,4 @@ test('fatal error', function (t) {
164166 t . ok ( err . toString ( ) . match ( / U n e x p e c t e d t o k e n / ) , 'reports syntax error' ) ;
165167 t . end ( ) ;
166168 } , false ) ;
167- } ) ;
169+ } , options ) ;
0 commit comments