Skip to content

Commit

Permalink
acquireConnection return promise
Browse files Browse the repository at this point in the history
Return an actual promise instead of a promise like object.
  • Loading branch information
jbrumwell committed Apr 4, 2017
1 parent 6d52239 commit 4b3fcf3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
8 changes: 1 addition & 7 deletions dist/platforms/knex/0.12/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@ var spec = exports.spec = _lodash2.default.defaultsDeep({
replace: [{
client: {
acquireConnection: function acquireConnection() {
return {
completed: connection,
abort: _lodash2.default.noop,
then: function then(cb) {
cb(connection);
}
};
return _bluebird2.default.resolve(connection);
}
}
}]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mock-knex",
"version": "0.3.7",
"version": "0.3.8",
"description": "a knex mock adapter for simulating a db during testing",
"main": "index.js",
"scripts": {
Expand Down
8 changes: 1 addition & 7 deletions src/platforms/knex/0.12/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ export const spec = _.defaultsDeep({
{
client : {
acquireConnection() {
return {
completed : connection,
abort : _.noop,
then : function(cb) {
cb(connection);
},
};
return Promise.resolve(connection);
},
},
},
Expand Down

0 comments on commit 4b3fcf3

Please sign in to comment.