File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -128,19 +128,17 @@ describe('Subscribe to buffer', () => {
128
128
// when using messageBuffer, with redis instance the channel name is not a string but a buffer
129
129
const pubSub = new RedisPubSub ( { messageEventName : 'messageBuffer' } ) ;
130
130
const payload = 'This is amazing' ;
131
- let subId ;
131
+
132
132
pubSub . subscribe ( 'Posts' , message => {
133
133
try {
134
134
expect ( message ) . to . be . instanceOf ( Buffer ) ;
135
135
expect ( message . toString ( 'utf-8' ) ) . to . be . equal ( payload ) ;
136
- pubSub . unsubscribe ( subId ) ;
137
136
done ( ) ;
138
137
} catch ( e ) {
139
138
done ( e ) ;
140
139
}
141
140
} ) . then ( async subId => {
142
141
try {
143
- subId = subId ;
144
142
await pubSub . publish ( 'Posts' , Buffer . from ( payload , 'utf-8' ) ) ;
145
143
} catch ( e ) {
146
144
done ( e ) ;
You can’t perform that action at this time.
0 commit comments