UnitTests

This commit is contained in:
chk
2026-06-08 15:40:07 +02:00
parent 2e521c510f
commit 172606c7a3
8 changed files with 275 additions and 5 deletions

View File

@@ -90,7 +90,7 @@ describe('GCode.receiveGCode', () => {
expect(robot.sendCommand).toHaveBeenCalled()
})
test('G28 setzt Home-Position', () => {
test('G28 setzt Home-Position und löst Bewegung aus', () => {
const robot = createDummyRobot()
GCode.receiveGCode(robot, 'G28')
@@ -100,6 +100,8 @@ describe('GCode.receiveGCode', () => {
expect(robot.y).toBe(robot.l1 + robot.l2 + robot.l3)
expect(robot.phi).toBeCloseTo(-Math.PI / 2)
expect(robot.theta).toBeCloseTo(Math.PI / 2)
expect(robot.calculateAngles3D).toHaveBeenCalledTimes(1)
expect(robot.sendCommand).toHaveBeenCalledTimes(1)
})
test('Sende falsches Format', () =>{