Brian C 1b5f3e33c4
Monorepo (#2014)
* First crack at monorepo

* Update test command

* Update path to script

* Remove node 6 from CI
2019-12-17 08:32:08 -08:00

17 lines
532 B
JavaScript

'use strict'
var helper = require(__dirname + '/test-helper')
// http://www.postgresql.org/docs/8.3/static/libpq-notify.html
test('recieves notification from same connection with no payload', function () {
helper.connect(function (con) {
con.query('LISTEN boom')
assert.emits(con, 'readyForQuery', function () {
con.query('NOTIFY boom')
assert.emits(con, 'notification', function (msg) {
assert.equal(msg.payload, '')
assert.equal(msg.channel, 'boom')
con.end()
})
})
})
})