This commit is contained in:
2025-09-03 19:18:44 +01:00
parent eb620087c9
commit 695964a636
29 changed files with 631 additions and 571 deletions

View File

@@ -1,11 +1,11 @@
import { MessageTypes } from '../../src/common'
import { packers } from '../../src/mapping'
import { MessageTypes } from "../../src/common";
import { packers } from "../../src/mapping";
test('Create a keepalive (0x0005) packet.', () => {
test("Create a keepalive (0x0005) packet.", () => {
// When
const packedPacket = packers[MessageTypes.Keepalive]()
const packedPacket = packers[MessageTypes.Keepalive]();
// Then
const expectedResult = new Uint8Array([0x00, 0x05, 0x00, 0x00])
expect(packedPacket).toMatchObject(expectedResult)
})
const expectedResult = new Uint8Array([0x00, 0x05, 0x00, 0x00]);
expect(packedPacket).toMatchObject(expectedResult);
});