tests
This commit is contained in:
@@ -22,7 +22,7 @@ test('G28 ist ein GCode Command', () => {
|
||||
})
|
||||
|
||||
|
||||
test("ReadPosition -> G1", () => {
|
||||
test("ReadPosition -> G1 -> telnetSender", () => {
|
||||
|
||||
const L1 = 300;
|
||||
const L2 = 300;
|
||||
@@ -46,4 +46,28 @@ test('G28 ist ein GCode Command', () => {
|
||||
});
|
||||
|
||||
|
||||
test("ReadPosition -> G1 -> telnetSender -- empty", () => {
|
||||
|
||||
const L1 = 300;
|
||||
const L2 = 300;
|
||||
const L3 = 20;
|
||||
|
||||
const robot = new Robot(L1, L2, L3)
|
||||
|
||||
var telnetSender1 = new TenetSender(urlGRBL = "test.test", maxSpeedF = 2300, xAxisGrbl = "x", yAxisGrbl = "y", zAxisGrbl = "z");
|
||||
var telnetSender2 = new TenetSender(urlGRBL = "test.test", maxSpeedF = 5000, xAxisGrbl = "x", yAxisGrbl = null, zAxisGrbl = null);
|
||||
var telnetSender3 = new TenetSender(urlGRBL = "test.test", maxSpeedF = 5000, xAxisGrbl = "a", yAxisGrbl = "y", zAxisGrbl = "b");
|
||||
|
||||
robot.cmdReceivers.push(telnetSender1);
|
||||
robot.cmdReceivers.push(telnetSender2);
|
||||
robot.cmdReceivers.push(telnetSender3);
|
||||
|
||||
|
||||
GCode.receiveGCode(robot,"G1 x120");
|
||||
|
||||
expect(telnetSender2.tSocket.written.toString().length).toBeGreaterThan(2)
|
||||
expect(telnetSender3.tSocket.written.toString().length).toBe(0)
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user