WS eigene Datei
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
var PythonSender = require('../robot/PythonSender.js');
|
||||
|
||||
|
||||
test('Initialisiere den WS', () => {
|
||||
var p = new PythonSender();
|
||||
p.server.close();
|
||||
});
|
||||
|
||||
test('Connect to WS', ()=> {
|
||||
var p = new PythonSender(9991);
|
||||
|
||||
const WebSocket = require('ws');
|
||||
|
||||
//w = new WebSocket("ws://localhost:9991")
|
||||
|
||||
//console.log(p.sockets)
|
||||
p.server.close();
|
||||
})
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ describe("WS-SenderGRBL.execCommand", () => {
|
||||
});
|
||||
|
||||
|
||||
test("writes correct G-code to mocked tSocket Ellbow", () => {
|
||||
test("writes correct G-code to mocked tSocket Ellbow", () => {
|
||||
|
||||
// Create instance (will try real connection, but we override tSocket immediately)
|
||||
const sender = new Sender(urlGRBL = "test.test", maxSpeedF = 2300, xAxisGrbl = "a", yAxisGrbl = null, zAxisGrbl = null );
|
||||
@@ -50,7 +50,7 @@ describe("WS-SenderGRBL.execCommand", () => {
|
||||
expect(sender.tSocket.written).toBe("G1 x22.50 f2300.00\r\n");
|
||||
});
|
||||
|
||||
test("writes correct G-code G92 to mocked WS tSocket", () => {
|
||||
test("writes correct G-code G92 to mocked WS tSocket", () => {
|
||||
|
||||
// Create instance (will try real connection, but we override tSocket immediately)
|
||||
const sender = new Sender(urlGRBL = "test.test", maxSpeedF = 2300, xAxisGrbl = "x", yAxisGrbl = "y", zAxisGrbl = "z");
|
||||
|
||||
Reference in New Issue
Block a user