Skip to content
Snippets Groups Projects
Commit 560b82c4 authored by murgatroid99's avatar murgatroid99
Browse files

Added tests for UNKNOWN status when the handler does not specify

parent 06f09729
No related branches found
No related tags found
No related merge requests found
......@@ -422,6 +422,7 @@ describe('Other conditions', function() {
it('for a unary call', function(done) {
client.unary({error: true}, function(err, data) {
assert(err);
assert.strictEqual(err.code, grpc.status.UNKNOWN);
assert.strictEqual(err.message, 'Requested error');
done();
});
......@@ -429,6 +430,7 @@ describe('Other conditions', function() {
it('for a client stream call', function(done) {
var call = client.clientStream(function(err, data) {
assert(err);
assert.strictEqual(err.code, grpc.status.UNKNOWN);
assert.strictEqual(err.message, 'Requested error');
done();
});
......@@ -440,6 +442,7 @@ describe('Other conditions', function() {
var call = client.serverStream({error: true});
call.on('data', function(){});
call.on('error', function(error) {
assert.strictEqual(error.code, grpc.status.UNKNOWN);
assert.strictEqual(error.message, 'Requested error');
done();
});
......@@ -451,6 +454,7 @@ describe('Other conditions', function() {
call.end();
call.on('data', function(){});
call.on('error', function(error) {
assert.strictEqual(error.code, grpc.status.UNKNOWN);
assert.strictEqual(error.message, 'Requested error');
done();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment