UnitTest aktualisieren
This commit is contained in:
@@ -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");
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user