Skip to content

Commit dd0d483

Browse files
Fix Web.JS tests (#12513)
1 parent 2029a0f commit dd0d483

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Components/Web.JS/tests/DefaultReconnectDisplay.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { DefaultReconnectDisplay } from "../src/Platform/Circuits/DefaultReconnectDisplay";
2-
import { AutoReconnectCircuitHandler } from "../src/Platform/Circuits/AutoReconnectCircuitHandler";
32
import {JSDOM} from 'jsdom';
43

54
describe('DefaultReconnectDisplay', () => {

src/Components/Web.JS/tests/RenderQueue.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ describe('RenderQueue', () => {
2525

2626
});
2727

28-
it('processBatch does not render previous batches', () => {
28+
it('processBatch acknowledges previously rendered batches', () => {
2929
const queue = RenderQueue.getOrCreateQueue(3, NullLogger.instance);
3030

3131
const sendMock = jest.fn();
3232
const connection = { send: sendMock } as any as signalR.HubConnection;
33-
queue.processBatch(1, new Uint8Array(0), connection);
33+
queue.processBatch(2, new Uint8Array(0), connection);
3434

35-
expect(sendMock.mock.calls.length).toEqual(0);
35+
expect(sendMock.mock.calls.length).toEqual(1);
36+
expect(queue.getLastBatchid()).toEqual(2);
3637
});
3738

3839
it('processBatch does not render out of order batches', () => {

0 commit comments

Comments
 (0)