Improve name of commands property

This commit is contained in:
Jordan Eldredge 2019-06-15 17:38:36 -07:00
parent 843c31c947
commit d1601871e8
2 changed files with 5 additions and 5 deletions

View file

@ -198,7 +198,7 @@ class Parser {
const variables = this._readVariables();
const constants = this._readConstants();
const functions = this._readFunctions();
const decoding = this._decodeCode({
const commands = this._decodeCode({
types,
variables,
functionNames,
@ -211,7 +211,7 @@ class Parser {
variables,
constants,
functions,
decoding
commands
};
}
}

View file

@ -92,8 +92,8 @@ describe("standardframe.maki", () => {
[33, 1]
];
test("can read decoding", () => {
maki.decoding.forEach((command, i) => {
test("can read commands", () => {
maki.commands.forEach((command, i) => {
const [expectedOpcode, expectedSize] = expectedCommands[i];
if (expectedOpcode !== command.opcode) {
throw new Error(
@ -108,6 +108,6 @@ describe("standardframe.maki", () => {
);
}
});
expect(maki.decoding.length).toBe(256);
expect(maki.commands.length).toBe(expectedCommands.length);
});
});