Skip to content

Commit

Permalink
fix(tests): use node v4 compatible syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
stropitek committed Sep 20, 2016
1 parent 7714438 commit 47830f7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/util/nanoPromise.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ exports.insertDocument = function (db, doc) {
});
};

exports.queryView = function (db, view, params = {}, options = {}) {
exports.queryView = function (db, view, params, options) {
options = options || {};
params = params || {};
if (!hasOwnProperty.call(params, 'reduce')) {
params.reduce = false;
}
Expand Down Expand Up @@ -153,7 +155,8 @@ exports.attachFiles = function (db, doc, files) {
});
};

exports.getAttachment = function (db, doc, name, asStream, options = {}) {
exports.getAttachment = function (db, doc, name, asStream, options) {
options = options || {};
return new Promise((resolve, reject) => {
debug.trace(`get attachment ${doc}/${name}`);
cleanOptions(options);
Expand All @@ -169,7 +172,8 @@ exports.getAttachment = function (db, doc, name, asStream, options = {}) {
});
};

exports.request = function (nano, options = {}) {
exports.request = function (nano, options) {
options = options || {};
return new Promise((resolve, reject) => {
debug.trace('request');
cleanOptions(options);
Expand Down

0 comments on commit 47830f7

Please sign in to comment.