From a5b47118368f75d78718780e394a55e5847cb849 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Mon, 12 Aug 2024 09:40:34 +0200 Subject: [PATCH] test(binding-coap): adjust cov:observe test --- packages/binding-coap/test/coap-server-test.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/binding-coap/test/coap-server-test.ts b/packages/binding-coap/test/coap-server-test.ts index 467e10133..a947cfff1 100644 --- a/packages/binding-coap/test/coap-server-test.ts +++ b/packages/binding-coap/test/coap-server-test.ts @@ -635,7 +635,7 @@ class CoapServerTest { await coapServer.stop(); } - @test async "should add the cov:observe subprotocol value to observable properties and events "() { + @test async "should add the correct operation types to observable properties and events "() { const coapServer = new CoapServer({ port: 5683 }); const servient = new Servient(); servient.addServer(coapServer); @@ -702,14 +702,17 @@ class CoapServerTest { for (const event of Object.values(td.events!)) { for (const form of event.forms) { const opValues = form.op!; - expect(opValues.length > 0); + // eslint-disable-next-line no-unused-expressions + expect(opValues.length > 0).to.be.true; const eventOpValueCount = filterEventOperations(opValues as Array).length; const eventOpValueCountPresent = eventOpValueCount > 0; - expect(eventOpValueCountPresent); + // eslint-disable-next-line no-unused-expressions + expect(eventOpValueCountPresent).to.be.true; - expect(form.subprotocol === "cov:observe"); + // eslint-disable-next-line no-unused-expressions + expect(form.subprotocol === "cov:observe").to.be.false; } }