add encoder for spot module

This commit is contained in:
2025-03-15 13:09:44 -05:00
parent f8f3f060dc
commit 09719a8791
3 changed files with 41 additions and 0 deletions
+7
View File
@@ -3,6 +3,13 @@ const { describe, it } = require('node:test');
const { Encoders } = require('../');
const goodTests = [
{
description: 'Spot + Single Channel Block',
expected: new Uint8Array([0x0a, 0x00, 0x0e, 0x12, 0x34, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x06, 0x40]),
bytes: () => {
return Encoders.Spot(0x1234, 1, [Encoders.ChannelBlock(8, 6, 64)]);
},
},
{
description: 'Channel Block',
expected: new Uint8Array([0x00, 0x08, 0x00, 0x06, 0x40]),