node-postgres/test/integration/connection-pool/yield-support-tests.js
Brian C b1b2801c71 Add onFailure to query#then (#1082)
The promise adapter I had implemented wasn't spec compliant: it didn't accept both `onSuccess` and `onFailure` in the call to `query#then`.  This subtly broke yield & async/await because they both rely on `onError` being passed into `Promise#then`.  The pool was also not returning the promise after a client was acquired, which broke awaiting on `pool.connect` - this is also fixed now.
2016-07-19 10:16:48 -05:00

6 lines
172 B
JavaScript

var semver = require('semver')
if (semver.lt(process.version, '1.0.0')) {
return console.log('yield is not supported in node <= v0.12')
}
require('./yield-support-body')