Default Log
This commit is contained in:
@@ -71,10 +71,15 @@ test('Cursor wird beim Speichern als !-Kommentar abgelegt (genau eine Zeile)', a
|
||||
expect(units.splitComment(marked[0]).code).toBe('G4 P0.1');
|
||||
});
|
||||
|
||||
test('Aktion ohne aktives Programm → NO_ACTIVE_PROGRAM', async () => {
|
||||
test('Stepping ohne aktives Programm → NO_ACTIVE_PROGRAM', async () => {
|
||||
const a = new ActiveState();
|
||||
expect(() => a.next()).toThrow(); // NO_ACTIVE_PROGRAM
|
||||
await expect(a.appendPoint({ x: 0, y: 0, z: 0, a: 0, b: 0, c: 0, e: 0 })).rejects.toMatchObject({
|
||||
code: 'NO_ACTIVE_PROGRAM',
|
||||
});
|
||||
});
|
||||
|
||||
test('FPoint ohne aktives Programm → auto-lädt Default-Programm (log)', async () => {
|
||||
const a = new ActiveState();
|
||||
// appendPoint lädt automatisch das Default-Programm und legt es leer an
|
||||
const r = await a.appendPoint({ x: 0, y: 0, z: 0, a: 0, b: 0, c: 0, e: 0 });
|
||||
expect(r.index).toBe(0);
|
||||
expect(a.programId).toBeTruthy(); // Default-Programm wurde geladen
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user