@@ -635,7 +635,7 @@ class CoapServerTest {
635635 await coapServer . stop ( ) ;
636636 }
637637
638- @test async "should add the cov:observe subprotocol value to observable properties and events " ( ) {
638+ @test async "should add the correct operation types to observable properties and events " ( ) {
639639 const coapServer = new CoapServer ( { port : 5683 } ) ;
640640 const servient = new Servient ( ) ;
641641 servient . addServer ( coapServer ) ;
@@ -679,7 +679,6 @@ class CoapServerTest {
679679
680680 if ( observeOpValuePresent ) {
681681 observeOpValueFormCount ++ ;
682- expect ( form . subprotocol ) . to . eql ( "cov:observe" ) ;
683682 }
684683
685684 const readWriteOpValueCount = filterPropertyReadWriteOperations (
@@ -703,14 +702,17 @@ class CoapServerTest {
703702 for ( const event of Object . values ( td . events ! ) ) {
704703 for ( const form of event . forms ) {
705704 const opValues = form . op ! ;
706- expect ( opValues . length > 0 ) ;
705+ // eslint-disable-next-line no-unused-expressions
706+ expect ( opValues . length > 0 ) . to . be . true ;
707707
708708 const eventOpValueCount = filterEventOperations ( opValues as Array < string > ) . length ;
709709 const eventOpValueCountPresent = eventOpValueCount > 0 ;
710710
711- expect ( eventOpValueCountPresent ) ;
711+ // eslint-disable-next-line no-unused-expressions
712+ expect ( eventOpValueCountPresent ) . to . be . true ;
712713
713- expect ( form . subprotocol === "cov:observe" ) ;
714+ // eslint-disable-next-line no-unused-expressions
715+ expect ( form . subprotocol === "cov:observe" ) . to . be . false ;
714716 }
715717 }
716718
0 commit comments