From d967b48c468952706746068bb476a17a8143b166 Mon Sep 17 00:00:00 2001 From: Marek Serafin Date: Thu, 2 Nov 2023 17:47:52 +0100 Subject: [PATCH] test: adjusted test for new state event from hci socket --- test/lib/hci-socket/hci.test.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/lib/hci-socket/hci.test.js b/test/lib/hci-socket/hci.test.js index 2820f388..83e17a47 100644 --- a/test/lib/hci-socket/hci.test.js +++ b/test/lib/hci-socket/hci.test.js @@ -40,9 +40,10 @@ describe('hci-socket hci', () => { hci._userChannel = 'userChannel'; hci.init(); - assert.callCount(hci._socket.on, 2); + assert.callCount(hci._socket.on, 3); assert.calledWithMatch(hci._socket.on, 'data', sinon.match.func); assert.calledWithMatch(hci._socket.on, 'error', sinon.match.func); + assert.calledWithMatch(hci._socket.on, 'state', sinon.match.func); assert.calledOnceWithExactly(hci._socket.bindUser, deviceId, undefined); assert.calledOnceWithExactly(hci._socket.start); @@ -57,9 +58,10 @@ describe('hci-socket hci', () => { hci._bound = false; hci.init(); - assert.callCount(hci._socket.on, 2); + assert.callCount(hci._socket.on, 3); assert.calledWithMatch(hci._socket.on, 'data', sinon.match.func); assert.calledWithMatch(hci._socket.on, 'error', sinon.match.func); + assert.calledWithMatch(hci._socket.on, 'state', sinon.match.func); assert.calledOnceWithExactly(hci._socket.bindRaw, deviceId, undefined); assert.calledOnceWithExactly(hci._socket.start); @@ -76,9 +78,10 @@ describe('hci-socket hci', () => { hci._bound = true; hci.init(); - assert.callCount(hci._socket.on, 2); + assert.callCount(hci._socket.on, 3); assert.calledWithMatch(hci._socket.on, 'data', sinon.match.func); assert.calledWithMatch(hci._socket.on, 'error', sinon.match.func); + assert.calledWithMatch(hci._socket.on, 'state', sinon.match.func); assert.notCalled(hci._socket.bindRaw); assert.calledOnceWithExactly(hci._socket.start);