Skip to content

Commit ad578bf

Browse files
author
Ruben Bridgewater
committed
Add testcase for the error regression
1 parent 534deff commit ad578bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/parsers.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe('parsers', function () {
112112
}
113113
var parser = new Parser({
114114
returnReply: checkReply,
115-
returnError: returnError,
115+
returnError: checkError,
116116
returnFatalError: checkError,
117117
returnBuffers: true
118118
})
@@ -123,6 +123,8 @@ describe('parsers', function () {
123123
assert.strictEqual(errCount, 1)
124124
parser.execute(new Buffer('*1\r\n+CCC\r\n'))
125125
assert.strictEqual(replyCount, 2)
126+
parser.execute(new Buffer('-Protocol error, got "b" as reply type byte\r\n'))
127+
assert.strictEqual(errCount, 2)
126128
})
127129

128130
it('parser error v3 without returnFatalError specified', function () {

0 commit comments

Comments
 (0)