move ticket to session

This commit is contained in:
DavidVentura
2024-01-27 13:43:01 +01:00
parent 342ee29191
commit 88ac1107f5
3 changed files with 20 additions and 26 deletions
+2 -1
View File
@@ -130,8 +130,9 @@ describe("make packet", () => {
// output is 0x3010; 'start video'; hardcoded but shouldnt
const expected = hstrToBA(_expected_str);
const sess = { outgoingCommandId: 0 };
const sess = { outgoingCommandId: 0, ticket: [0, 0, 0, 0] };
const got = createResponseForControlCommand(sess, new DataView(hstrToBA(input_pkt_str)));
assert.deepEqual(got.buffer, expected);
assert.deepEqual(sess.ticket, [0x65, 0x51, 0x46, 0x36]);
});
});