-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
The review process of PR #386 found a couple of issues that need resolving (and postponed for this issue as the findings where already in the code before migrating).
All can be found in the src/nodes/victron-virtual/index.js file:
- Why
stringify()and thenparse(). Line145(Refactor/virtual device types #386 (comment)) - Dubious usage of
actualDevvsdev: We use actualDev in the next line, but further down we use dev. Lines108(Refactor/virtual device types #386 (comment)) and131(Refactor/virtual device types #386 (comment)) - This object definition duplicates the object we return within the previous
if(). I suggest to refactor this, so that the for (const key in ...) below iterates zero times if there are no properties. The return value at the end of the function will be the same (as the object returned in the previous if()). Around line139(Refactor/virtual device types #386 (comment))
And add extra test to increase code coverage:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels