mirror of
https://github.com/jwetzell/rttrp-js.git
synced 2026-08-20 14:29:04 +00:00
add boilerplate for lighting encode tests
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
const { deepEqual, throws } = require('assert');
|
||||
const { describe, it } = require('node:test');
|
||||
const { Encoders } = require('../');
|
||||
|
||||
const goodTests = [];
|
||||
|
||||
describe('RTTrPL Message Encoding', () => {
|
||||
goodTests.forEach((messageTest) => {
|
||||
it(messageTest.description, () => {
|
||||
const actual = messageTest.bytes();
|
||||
deepEqual(actual, messageTest.expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//TODO(jwetzell): add tests that handle errors
|
||||
const badTests = [];
|
||||
|
||||
describe('RTTrPL Message Encoding Throws', () => {
|
||||
badTests.forEach((messageTest) => {
|
||||
it(messageTest.description, () => {
|
||||
messageTest.bytes();
|
||||
throws(() => {}, messageTest.throwsMessage);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user