From ea1b11fa417a82cb5c913fa4bbaae58b15a728c4 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Tue, 17 Sep 2019 19:23:19 +0100 Subject: [PATCH] chore: add test serializing commands without calling updateProps --- src/commands/__tests__/index.spec.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/commands/__tests__/index.spec.ts b/src/commands/__tests__/index.spec.ts index cd3eff7a6..c4225b9ad 100644 --- a/src/commands/__tests__/index.spec.ts +++ b/src/commands/__tests__/index.spec.ts @@ -831,3 +831,19 @@ describe('Commands v7.2', () => { runTestForCommand(commandParser, commandConverters, i, testCase, true) } }) + +describe('Serialize with no properties', () => { + const commandParser = new CommandParser() + commandParser.version = ProtocolVersion.V7_2 + + for (const name of Object.keys(commandParser.commands)) { + for (const cmd of commandParser.commands[name]) { + test(`Test ${name}`, () => { + const inst = new cmd() + if (inst.serialize) { + expect(inst.serialize(commandParser.version)).toBeTruthy() + } + }) + } + } +})