dbus-victron-virtual 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -28,8 +28,9 @@ describe("victron-dbus-virtual, GetValue and GetItems being called on us", () =>
|
|
|
28
28
|
]);
|
|
29
29
|
|
|
30
30
|
// GetValue on path / returns all props (therefore nested array)
|
|
31
|
+
// but without the leading slash
|
|
31
32
|
const rootValueResult = calls[0][0].GetValue();
|
|
32
|
-
expect(rootValueResult).toEqual([["
|
|
33
|
+
expect(rootValueResult).toEqual([["IntProp", ["i", 42]]]);
|
|
33
34
|
|
|
34
35
|
// GetValue on path /IntProp returns the value as a variant
|
|
35
36
|
const valueResult = calls[1][0].GetValue();
|
package/src/index.js
CHANGED
|
@@ -288,7 +288,7 @@ function addVictronInterfaces(
|
|
|
288
288
|
GetValue: function () {
|
|
289
289
|
return Object.entries(declaration.properties || {}).map(([k, v]) => {
|
|
290
290
|
debug("GetValue, definition[k] and v:", definition[k], v);
|
|
291
|
-
return [k.replace(/^(?!\/)/, "
|
|
291
|
+
return [k.replace(/^(?!\/)/, ""), wrapValue(v, definition[k])];
|
|
292
292
|
});
|
|
293
293
|
},
|
|
294
294
|
emit: function () { },
|