Fix over-eager deprecation warnings (#1333)
* WIP * Remove console.log messagesremotes/origin/carto-7.x
parent
f7a946155f
commit
842803c7ef
@ -0,0 +1,22 @@
|
||||
var helper = require('./test-helper')
|
||||
process.noDeprecation = false
|
||||
process.on('warning', function () {
|
||||
throw new Error('Should not emit deprecation warning')
|
||||
})
|
||||
|
||||
var client = new helper.pg.Client()
|
||||
|
||||
client.connect(function (err) {
|
||||
if (err) throw err
|
||||
client.query('SELECT NOW()')
|
||||
.then(function (res) {
|
||||
client.query('SELECT NOW()', function () {
|
||||
client.end(function () {
|
||||
})
|
||||
})
|
||||
}).catch(function (err) {
|
||||
setImmediate(function () {
|
||||
throw err
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Reference in new issue