updates
This commit is contained in:
@@ -12,11 +12,13 @@ test('execSequence startup reaches operational with zero transition times', asyn
|
||||
assert.equal(machine.state.getCurrentState(), 'operational');
|
||||
});
|
||||
|
||||
test('execMovement updates controller position in operational state', async () => {
|
||||
test('execMovement constrains controller position to safe bounds in operational state', async () => {
|
||||
const machine = new Machine(makeMachineConfig(), makeStateConfig({ state: { current: 'operational' } }));
|
||||
const { max } = machine._resolveSetpointBounds();
|
||||
|
||||
await machine.handleInput('parent', 'execMovement', 10);
|
||||
|
||||
const pos = machine.state.getCurrentPosition();
|
||||
assert.ok(pos >= 9.9 && pos <= 10);
|
||||
assert.ok(pos <= max);
|
||||
assert.equal(pos, max);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user