From 4f2c006310e26f3e2a3fa19e7e1128e776713e00 Mon Sep 17 00:00:00 2001 From: Dominic Griesel Date: Wed, 23 Oct 2024 14:34:16 +0200 Subject: [PATCH] chore: cleanup commented out code --- packages/zwave-js/src/lib/log/Driver.test.ts | 6 ------ .../zwave-js/src/lib/node/NodeReadyMachine.test.ts | 2 -- packages/zwave-js/src/lib/test/mocks.ts | 14 -------------- 3 files changed, 22 deletions(-) diff --git a/packages/zwave-js/src/lib/log/Driver.test.ts b/packages/zwave-js/src/lib/log/Driver.test.ts index 849c597323b1..1d2a75f697e3 100644 --- a/packages/zwave-js/src/lib/log/Driver.test.ts +++ b/packages/zwave-js/src/lib/log/Driver.test.ts @@ -35,12 +35,6 @@ test.before(async (t) => { loadConfiguration: false, skipNodeInterview: true, skipControllerIdentification: true, - // beforeStartup(mockPort) { - // controller = new MockController({ serial: mockPort }); - // controller.defineBehavior( - // ...createDefaultMockControllerBehaviors(), - // ); - // }, }); t.context.driver = driver; diff --git a/packages/zwave-js/src/lib/node/NodeReadyMachine.test.ts b/packages/zwave-js/src/lib/node/NodeReadyMachine.test.ts index ec082a9dbfd3..6bc0ee19faa7 100644 --- a/packages/zwave-js/src/lib/node/NodeReadyMachine.test.ts +++ b/packages/zwave-js/src/lib/node/NodeReadyMachine.test.ts @@ -30,8 +30,6 @@ test("when the driver is restarted from cache, the node should be ready as soon const service = startMachine(t, testMachine); service.send("RESTART_FROM_CACHE"); t.is(service.getSnapshot().value, "readyIfNotDead"); - // service.send("MAYBE_DEAD"); - // t.is(service.getSnapshot().value, "readyIfNotDead"); service.send("NOT_DEAD"); t.is(service.getSnapshot().value, "ready"); }); diff --git a/packages/zwave-js/src/lib/test/mocks.ts b/packages/zwave-js/src/lib/test/mocks.ts index 40c9e0d56c09..c0de2823edfa 100644 --- a/packages/zwave-js/src/lib/test/mocks.ts +++ b/packages/zwave-js/src/lib/test/mocks.ts @@ -249,10 +249,6 @@ export function createTestNode( return !ret.isListening && !ret.isFrequentListening; }, - // status: options.status - // ?? (options.isListening ? NodeStatus.Alive : NodeStatus.Asleep), - // interviewStage: options.interviewStage ?? InterviewStage.Complete, - setEndpoint: (endpoint) => { endpointCache.set( endpoint.index, @@ -292,16 +288,6 @@ export function createTestNode( return ep; }, - // getAllEndpoints() { - // if (!options.numEndpoints) return [...endpointCache.values()]; - // const eps: IZWaveEndpoint[] = []; - // for (let i = 0; i <= options.numEndpoints; i++) { - // const ep = ret.getEndpoint(i); - // if (ep) eps.push(ep); - // } - // return eps; - // }, - // These are copied from Node.ts getHighestSecurityClass(): SecurityClass | undefined { if (securityClasses.size === 0) return undefined;