UnitTest aktualisieren

This commit is contained in:
ChK
2026-04-23 20:45:49 +02:00
parent a16eb53aeb
commit 355925ebb4
8 changed files with 1660 additions and 16 deletions

View File

@@ -23,7 +23,7 @@ describe("WS-SenderGRBL.execCommand", () => {
sender.execCommand("G1", mOld, mNew);
// ✅ verify output
expect(sender.tSocket.written).toBe("G1 x12.34 y57.30 z57.30 f2300.00\r\n");
expect(sender.tSocket.written).toBe("G90 G1 x12.34 y57.30 z57.30 f2300.00\r\n");
});
@@ -47,7 +47,7 @@ describe("WS-SenderGRBL.execCommand", () => {
sender.execCommand("G1", mOld, mNew);
// ✅ verify output
expect(sender.tSocket.written).toBe("G1 x22.50 f2300.00\r\n");
expect(sender.tSocket.written).toBe("G90 G1 x22.50 f2300.00\r\n");
});
test("writes correct G-code G92 to mocked WS tSocket", () => {
@@ -70,7 +70,7 @@ describe("WS-SenderGRBL.execCommand", () => {
sender.execCommand("G92", mOld, mNew);
// ✅ verify output
expect(sender.tSocket.written).toBe("G92 x12.34 y57.30 z57.30 f2300.00\r\n");
expect(sender.tSocket.written.replace("G90 ","")).toBe("G92 x12.34 y57.30 z57.30 f2300.00\r\n");
});
});