File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -109,16 +109,16 @@ class NodeOptions {
109109 }
110110
111111 /**
112- * Get the startTypeDescriptionService option.
112+ * Get the startTypeDescriptionService option, only available for ROS2 > Humble .
113113 * Default value = true;
114- * @returns {boolean } -
114+ * @returns {boolean } - true if the type description service is enabled.
115115 */
116116 get startTypeDescriptionService ( ) {
117117 return this . _startTypeDescriptionService ;
118118 }
119119
120120 /**
121- * Set startTypeDescriptionService.
121+ * Set startTypeDescriptionService, only available for ROS2 > Humble
122122 * @param {boolean } willStartTypeDescriptionService
123123 */
124124 set startTypeDescriptionService ( willStartTypeDescriptionService ) {
Original file line number Diff line number Diff line change @@ -89,13 +89,9 @@ describe('Node extra destroy methods testing', function () {
8989 it ( 'destroyService()' , function ( ) {
9090 var node = rclnodejs . createNode ( 'node4' ) ;
9191 const AddTwoInts = 'example_interfaces/srv/AddTwoInts' ;
92+ const initialServiceCount = node . _services . length ;
9293 var service = node . createService ( AddTwoInts , 'add_two_ints' , ( ) => { } ) ;
93- if ( DistroUtils . getDistroId ( ) <= DistroUtils . getDistroId ( 'humble' ) ) {
94- assert . deepStrictEqual ( node . _services . length , 7 ) ;
95- } else {
96- assert . deepStrictEqual ( node . _services . length , 8 ) ;
97- }
98-
94+ assert . deepStrictEqual ( node . _services . length , initialServiceCount + 1 ) ;
9995 assertThrowsError (
10096 function ( ) {
10197 node . destroyService ( 'service' ) ;
@@ -106,11 +102,7 @@ describe('Node extra destroy methods testing', function () {
106102 ) ;
107103
108104 node . destroyService ( service ) ;
109- if ( DistroUtils . getDistroId ( ) <= DistroUtils . getDistroId ( 'humble' ) ) {
110- assert . deepStrictEqual ( node . _services . length , 6 ) ;
111- } else {
112- assert . deepStrictEqual ( node . _services . length , 7 ) ;
113- }
105+ assert . deepStrictEqual ( node . _services . length , initialServiceCount ) ;
114106 } ) ;
115107
116108 it ( 'destroyTimer()' , function ( ) {
You can’t perform that action at this time.
0 commit comments