Fix Web.JS tests (#12513)
This commit is contained in:
parent
2029a0f3e4
commit
dd0d483f7d
|
|
@ -1,5 +1,4 @@
|
|||
import { DefaultReconnectDisplay } from "../src/Platform/Circuits/DefaultReconnectDisplay";
|
||||
import { AutoReconnectCircuitHandler } from "../src/Platform/Circuits/AutoReconnectCircuitHandler";
|
||||
import {JSDOM} from 'jsdom';
|
||||
|
||||
describe('DefaultReconnectDisplay', () => {
|
||||
|
|
|
|||
|
|
@ -25,14 +25,15 @@ describe('RenderQueue', () => {
|
|||
|
||||
});
|
||||
|
||||
it('processBatch does not render previous batches', () => {
|
||||
it('processBatch acknowledges previously rendered batches', () => {
|
||||
const queue = RenderQueue.getOrCreateQueue(3, NullLogger.instance);
|
||||
|
||||
const sendMock = jest.fn();
|
||||
const connection = { send: sendMock } as any as signalR.HubConnection;
|
||||
queue.processBatch(1, new Uint8Array(0), connection);
|
||||
queue.processBatch(2, new Uint8Array(0), connection);
|
||||
|
||||
expect(sendMock.mock.calls.length).toEqual(0);
|
||||
expect(sendMock.mock.calls.length).toEqual(1);
|
||||
expect(queue.getLastBatchid()).toEqual(2);
|
||||
});
|
||||
|
||||
it('processBatch does not render out of order batches', () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue