Compare commits
1 Commits
5d79314229
...
36eaa2f859
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36eaa2f859 |
@@ -6,7 +6,7 @@ const commands = require('../../src/commands');
|
||||
const { createRegistry } = require('generalFunctions');
|
||||
const { makeNodeStub, makeREDStub } = require('../helpers/factories');
|
||||
|
||||
test('measurement topic accepts numeric strings and ignores non-numeric objects', async () => {
|
||||
test('measurement topic accepts numeric strings and rich analog object payloads', async () => {
|
||||
const inst = Object.create(NodeClass.prototype);
|
||||
const node = makeNodeStub();
|
||||
const calls = [];
|
||||
@@ -29,5 +29,5 @@ test('measurement topic accepts numeric strings and ignores non-numeric objects'
|
||||
await onInput({ topic: 'measurement', payload: '42' }, () => {}, () => {});
|
||||
await onInput({ topic: 'measurement', payload: { value: 42 } }, () => {}, () => {});
|
||||
|
||||
assert.deepEqual(calls, [42]);
|
||||
assert.deepEqual(calls, [42, 42]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user