You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
feat: always return strings from "message" listener
Listening to "messageBuffer" returns Buffers
This commit is contained in:
@@ -444,7 +444,7 @@ describe('publish/subscribe', () => {
|
||||
// sub2 is counted twice as it subscribed with psubscribe and subscribe
|
||||
pub.publish('/foo', 'hello world').then(helper.isNumber(3))
|
||||
})
|
||||
sub2.on('pmessage', (pattern, channel, message) => {
|
||||
sub2.on('pmessageBuffer', (pattern, channel, message) => {
|
||||
assert.strictEqual(pattern.inspect(), Buffer.from('*').inspect())
|
||||
assert.strictEqual(channel.inspect(), Buffer.from('/foo').inspect())
|
||||
assert.strictEqual(message.inspect(), Buffer.from('hello world').inspect())
|
||||
|
Reference in New Issue
Block a user