diff options
Diffstat (limited to 'src/node/test/constant_test.js')
-rw-r--r-- | src/node/test/constant_test.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/node/test/constant_test.js b/src/node/test/constant_test.js index ecc98ec443..fa06ad4e4d 100644 --- a/src/node/test/constant_test.js +++ b/src/node/test/constant_test.js @@ -78,6 +78,31 @@ var callErrorNames = [ 'INVALID_FLAGS' ]; +/** + * List of all propagate flag names + * @const + * @type {Array.<string>} + */ +var propagateFlagNames = [ + 'DEADLINE', + 'CENSUS_STATS_CONTEXT', + 'CENSUS_TRACING_CONTEXT', + 'CANCELLATION', + 'DEFAULTS' +]; +/* + * List of all connectivity state names + * @const + * @type {Array.<string>} + */ +var connectivityStateNames = [ + 'IDLE', + 'CONNECTING', + 'READY', + 'TRANSIENT_FAILURE', + 'FATAL_FAILURE' +]; + describe('constants', function() { it('should have all of the status constants', function() { for (var i = 0; i < statusNames.length; i++) { @@ -91,4 +116,16 @@ describe('constants', function() { 'call error missing: ' + callErrorNames[i]); } }); + it('should have all of the propagate flags', function() { + for (var i = 0; i < propagateFlagNames.length; i++) { + assert(grpc.propagate.hasOwnProperty(propagateFlagNames[i]), + 'call error missing: ' + propagateFlagNames[i]); + } + }); + it('should have all of the connectivity states', function() { + for (var i = 0; i < connectivityStateNames.length; i++) { + assert(grpc.connectivityState.hasOwnProperty(connectivityStateNames[i]), + 'connectivity status missing: ' + connectivityStateNames[i]); + } + }); }); |