Skip to content

Commit e3014a2

Browse files
committed
fix callback
1 parent 9fa11af commit e3014a2

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

tests/integration/test.bulk_docs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

tests/integration/utils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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

175179
testUtils.getServerType = async () => {

0 commit comments

Comments
 (0)