Heartbeat
This commit is contained in:
@@ -35,6 +35,7 @@ describe('Sender Interface and TelnetSenderGRBL implementation', () => {
|
||||
createConnection: () => {
|
||||
const socket = new EventEmitter();
|
||||
socket.end = jest.fn();
|
||||
socket.setKeepAlive = jest.fn(); // benötigt für TCP-Keepalive im connect-Handler
|
||||
|
||||
process.nextTick(() => {
|
||||
connectAttempts += 1;
|
||||
@@ -68,6 +69,8 @@ describe('Sender Interface and TelnetSenderGRBL implementation', () => {
|
||||
netModule: netMock,
|
||||
TelnetSocketClass: DummyTelnetSocket,
|
||||
setTimeoutFn: (fn) => fn(),
|
||||
setIntervalFn: jest.fn(() => 1), // Heartbeat-Timer: kein echter Intervall
|
||||
clearIntervalFn: jest.fn(),
|
||||
autoConnect: false,
|
||||
reconnectDelay: 1,
|
||||
maxReconnectDelay: 2
|
||||
|
||||
Reference in New Issue
Block a user