@@ -395,7 +395,7 @@ describe('Rclnodejs - Cpp message type testing', function() {
395395
396396 subscription . stdout . on ( 'data' , ( data ) => {
397397 if ( ! destroy ) {
398- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
398+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
399399 timer . cancel ( ) ;
400400 node . destroy ( ) ;
401401 subscription . kill ( 'SIGINT' ) ;
@@ -422,7 +422,7 @@ describe('Rclnodejs - Cpp message type testing', function() {
422422
423423 subscription . stdout . on ( 'data' , ( data ) => {
424424 if ( ! destroy ) {
425- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
425+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
426426 timer . cancel ( ) ;
427427 node . destroy ( ) ;
428428 subscription . kill ( 'SIGINT' ) ;
@@ -450,7 +450,7 @@ describe('Rclnodejs - Cpp message type testing', function() {
450450
451451 subscription . stdout . on ( 'data' , ( data ) => {
452452 if ( ! destroy ) {
453- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
453+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
454454 timer . cancel ( ) ;
455455 node . destroy ( ) ;
456456 subscription . kill ( 'SIGINT' ) ;
@@ -477,7 +477,7 @@ describe('Rclnodejs - Cpp message type testing', function() {
477477
478478 subscription . stdout . on ( 'data' , ( data ) => {
479479 if ( ! destroy ) {
480- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
480+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
481481 timer . cancel ( ) ;
482482 node . destroy ( ) ;
483483 subscription . kill ( 'SIGINT' ) ;
@@ -504,7 +504,7 @@ describe('Rclnodejs - Cpp message type testing', function() {
504504
505505 subscription . stdout . on ( 'data' , ( data ) => {
506506 if ( ! destroy ) {
507- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
507+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
508508 timer . cancel ( ) ;
509509 node . destroy ( ) ;
510510 subscription . kill ( 'SIGINT' ) ;
@@ -531,7 +531,7 @@ describe('Rclnodejs - Cpp message type testing', function() {
531531
532532 subscription . stdout . on ( 'data' , ( data ) => {
533533 if ( ! destroy ) {
534- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
534+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
535535 timer . cancel ( ) ;
536536 node . destroy ( ) ;
537537 subscription . kill ( 'SIGINT' ) ;
@@ -558,7 +558,7 @@ describe('Rclnodejs - Cpp message type testing', function() {
558558
559559 subscription . stdout . on ( 'data' , ( data ) => {
560560 if ( ! destroy ) {
561- assert . deepStrictEqual ( data . toString ( ) . trim ( ) . toLowerCase ( ) , expected ) ;
561+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) . toLowerCase ( ) ) ) ;
562562 timer . cancel ( ) ;
563563 node . destroy ( ) ;
564564 subscription . kill ( 'SIGINT' ) ;
@@ -585,7 +585,7 @@ describe('Rclnodejs - Cpp message type testing', function() {
585585
586586 subscription . stdout . on ( 'data' , ( data ) => {
587587 if ( ! destroy ) {
588- assert . deepStrictEqual ( data . toString ( ) . trim ( ) . toLowerCase ( ) , expected ) ;
588+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) . toLowerCase ( ) ) ) ;
589589 timer . cancel ( ) ;
590590 node . destroy ( ) ;
591591 subscription . kill ( 'SIGINT' ) ;
@@ -611,8 +611,8 @@ describe('Rclnodejs - Cpp message type testing', function() {
611611 const expected = '7fffffff' ;
612612
613613 subscription . stdout . on ( 'data' , ( data ) => {
614- if ( ! destroy ) {
615- assert . deepStrictEqual ( data . toString ( ) . trim ( ) . toLowerCase ( ) , expected ) ;
614+ if ( ! destroy ) {
615+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) . toLowerCase ( ) ) ) ;
616616 timer . cancel ( ) ;
617617 node . destroy ( ) ;
618618 subscription . kill ( 'SIGINT' ) ;
@@ -638,8 +638,8 @@ describe('Rclnodejs - Cpp message type testing', function() {
638638 const expected = 'ffffffff' ;
639639
640640 subscription . stdout . on ( 'data' , ( data ) => {
641- if ( ! destroy ) {
642- assert . deepStrictEqual ( data . toString ( ) . trim ( ) . toLowerCase ( ) , expected ) ;
641+ if ( ! destroy ) {
642+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) . toLowerCase ( ) ) ) ;
643643 timer . cancel ( ) ;
644644 node . destroy ( ) ;
645645 subscription . kill ( 'SIGINT' ) ;
@@ -665,8 +665,8 @@ describe('Rclnodejs - Cpp message type testing', function() {
665665 const expected = '1fffffffffffff' ;
666666
667667 subscription . stdout . on ( 'data' , ( data ) => {
668- if ( ! destroy ) {
669- assert . deepStrictEqual ( data . toString ( ) . trim ( ) . toLowerCase ( ) , expected ) ;
668+ if ( ! destroy ) {
669+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) . toLowerCase ( ) ) ) ;
670670 timer . cancel ( ) ;
671671 node . destroy ( ) ;
672672 subscription . kill ( 'SIGINT' ) ;
@@ -692,8 +692,8 @@ describe('Rclnodejs - Cpp message type testing', function() {
692692 const expected = '1fffffffffffff' ;
693693
694694 subscription . stdout . on ( 'data' , ( data ) => {
695- if ( ! destroy ) {
696- assert . deepStrictEqual ( data . toString ( ) . trim ( ) . toLowerCase ( ) , expected ) ;
695+ if ( ! destroy ) {
696+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) . toLowerCase ( ) ) ) ;
697697 timer . cancel ( ) ;
698698 node . destroy ( ) ;
699699 subscription . kill ( 'SIGINT' ) ;
@@ -719,8 +719,8 @@ describe('Rclnodejs - Cpp message type testing', function() {
719719 const expected = '3.14' ;
720720
721721 subscription . stdout . on ( 'data' , ( data ) => {
722- if ( ! destroy ) {
723- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
722+ if ( ! destroy ) {
723+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
724724 timer . cancel ( ) ;
725725 node . destroy ( ) ;
726726 subscription . kill ( 'SIGINT' ) ;
@@ -746,8 +746,8 @@ describe('Rclnodejs - Cpp message type testing', function() {
746746 const expected = '3.1415926' ;
747747
748748 subscription . stdout . on ( 'data' , ( data ) => {
749- if ( ! destroy ) {
750- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
749+ if ( ! destroy ) {
750+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
751751 timer . cancel ( ) ;
752752 node . destroy ( ) ;
753753 subscription . kill ( 'SIGINT' ) ;
@@ -780,8 +780,8 @@ describe('Rclnodejs - Cpp message type testing', function() {
780780 const expected = '(0.5, 127, 255, 255)' ;
781781
782782 subscription . stdout . on ( 'data' , ( data ) => {
783- if ( ! destroy ) {
784- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
783+ if ( ! destroy ) {
784+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
785785 timer . cancel ( ) ;
786786 node . destroy ( ) ;
787787 subscription . kill ( 'SIGINT' ) ;
@@ -820,8 +820,8 @@ describe('Rclnodejs - Cpp message type testing', function() {
820820 const expected = 'ABC' ;
821821
822822 subscription . stdout . on ( 'data' , ( data ) => {
823- if ( ! destroy ) {
824- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
823+ if ( ! destroy ) {
824+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
825825 timer . cancel ( ) ;
826826 node . destroy ( ) ;
827827 subscription . kill ( 'SIGINT' ) ;
@@ -854,8 +854,8 @@ describe('Rclnodejs - Cpp message type testing', function() {
854854 const expected = '(123456,789,main frame)' ;
855855
856856 subscription . stdout . on ( 'data' , ( data ) => {
857- if ( ! destroy ) {
858- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
857+ if ( ! destroy ) {
858+ assert . ok ( new RegExp ( expected ) . test ( data . toString ( ) ) ) ;
859859 timer . cancel ( ) ;
860860 node . destroy ( ) ;
861861 subscription . kill ( 'SIGINT' ) ;
@@ -894,7 +894,7 @@ describe('Rclnodejs - Cpp message type testing', function() {
894894 const expected = '(123456,789,main frame,[Tom,Jerry,],[1,2,],[2,3,],[4,5,6,])' ;
895895 subscription . stdout . on ( 'data' , ( data ) => {
896896 if ( ! destroy ) {
897- assert . deepStrictEqual ( data . toString ( ) . trim ( ) , expected ) ;
897+ assert . notDeepStrictEqual ( data . toString ( ) . indexOf ( expected ) , - 1 ) ;
898898 timer . cancel ( ) ;
899899 node . destroy ( ) ;
900900 subscription . kill ( 'SIGINT' ) ;
0 commit comments