Skip to content

Commit a5b4711

Browse files
committed
test(binding-coap): adjust cov:observe test
1 parent 61980a9 commit a5b4711

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/binding-coap/test/coap-server-test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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);
@@ -702,14 +702,17 @@ class CoapServerTest {
702702
for (const event of Object.values(td.events!)) {
703703
for (const form of event.forms) {
704704
const opValues = form.op!;
705-
expect(opValues.length > 0);
705+
// eslint-disable-next-line no-unused-expressions
706+
expect(opValues.length > 0).to.be.true;
706707

707708
const eventOpValueCount = filterEventOperations(opValues as Array<string>).length;
708709
const eventOpValueCountPresent = eventOpValueCount > 0;
709710

710-
expect(eventOpValueCountPresent);
711+
// eslint-disable-next-line no-unused-expressions
712+
expect(eventOpValueCountPresent).to.be.true;
711713

712-
expect(form.subprotocol === "cov:observe");
714+
// eslint-disable-next-line no-unused-expressions
715+
expect(form.subprotocol === "cov:observe").to.be.false;
713716
}
714717
}
715718

0 commit comments

Comments
 (0)