mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 10:55:05 -05:00
Print if there is a diff in packets in the cycle packet test (#1273)
This commit is contained in:
parent
ccaf538ffd
commit
614be919d0
1 changed files with 4 additions and 0 deletions
|
@ -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`, () => {
|
||||
|
|
Loading…
Reference in a new issue