File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -334,7 +334,7 @@ adapters.forEach((adapter) => {
334334
335335 it ( '#2935 new_edits=false with single unauthorized' , async ( ) => {
336336
337- const isCouchDB = await new Promise ( resolve => testUtils . isCouchDB ( resolve ) ) ;
337+ const isCouchDB = await testUtils . isCouchDB ( ) ;
338338 if ( adapter !== 'http' || ! isCouchDB ) {
339339 return ;
340340 }
Original file line number Diff line number Diff line change @@ -169,7 +169,11 @@ testUtils.isCouchDB = async (cb) => {
169169 const { url, options} = parseHostWithCreds ( testUtils . couchHost ( ) ) ;
170170 const response = await PouchDB . fetch ( url , options ) ;
171171 const res = await response . json ( ) ;
172- cb ( 'couchdb' in res || 'express-pouchdb' in res ) ;
172+ const result = 'couchdb' in res || 'express-pouchdb' in res ;
173+ if ( cb ) {
174+ cb ( result ) ;
175+ }
176+ return result ;
173177} ;
174178
175179testUtils . getServerType = async ( ) => {
You can’t perform that action at this time.
0 commit comments