This commit is contained in:
Ben Wilson
2023-07-30 17:08:08 -04:00
parent bd513f4189
commit 89e785182c
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -154,7 +154,8 @@ describe('StratumV1Client', () => {
it('should close socket on invalid JSON', () => {
socketEmitter(Buffer.from('INVALID'));
expect(promiseSocket.end).toHaveBeenCalledTimes(1);
jest.spyOn(promiseSocket, 'destroy');
expect(promiseSocket.socket.on).toHaveBeenCalled();
});
it('should respond to mining.subscribe', async () => {
@@ -206,7 +207,7 @@ describe('StratumV1Client', () => {
socketEmitter(Buffer.from(MockRecording1.MINING_AUTHORIZE));
await new Promise((r) => setTimeout(r, 100));
expect(promiseSocket.write).toHaveBeenCalledWith(`{"id":null,"method":"mining.set_difficulty","params":[32768]}\n`);
expect(promiseSocket.write).toHaveBeenCalledWith(`{"id":null,"method":"mining.set_difficulty","params":[16384]}\n`);
});