From 614be919d0f20a43e238751c829a6d584ae636cd Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Fri, 29 Dec 2023 23:11:31 +0100 Subject: [PATCH] Print if there is a diff in packets in the cycle packet test (#1273) --- test/cyclePacketTest.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/cyclePacketTest.js b/test/cyclePacketTest.js index 9bd9f62..cd8693e 100644 --- a/test/cyclePacketTest.js +++ b/test/cyclePacketTest.js @@ -24,6 +24,10 @@ for (const supportedVersion of supportedVersions) { const parsed = convertBufferToObject(buffer).data const parsedBuffer = convertObjectToBuffer(parsed) const areEq = buffer.equals(parsedBuffer) + if (!areEq) { + console.log('original buffer', buffer.toString('hex')) + console.log('cycled buffer', parsedBuffer.toString('hex')) + } assert.strictEqual(areEq, true, `Error when testing ${+packetIx + 1} ${packetName} packet`) } describe(`Test cycle packet for version ${supportedVersion}v`, () => {