Erroneous aggregation of machine outputs when graph has deep hierarchy
brucou opened this issue · comments
While testing for integration with the yed graph editor:
const outputs1 = [
{ event1: { n: 0 } },
{ event1: void 0 },
{ event1: void 0 },
{ event2: { shouldReturnToA: false } },
{ event2: { shouldReturnToA: false } },
].map(createStateMachine(fsmDef, settings));
assert.deepEqual(outputs1, [
["A -> Group1", "Group1 -> B", null, "Group2 -> Group3", "Group3 -> B"],
[null, null],
["A -> B"],
["B -> D", null],
[null]
], `Branch machine initialized with number ok`);
fails. Instead a [null]
value is observed in the aggregated outputs:
[
["A -> Group1", "Group1 -> B", [null], "Group2 -> Group3", "Group3 -> B"],
[[null], [null]],
["A -> B"],
["B -> D", [null]],
[null]
], `Branch machine initialized with number ok`);
,,, actually the bug is with the object diff formatting of mocha. null
is presented as [null]
....