Skip to content

Fix Web.JS tests #12513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DefaultReconnectDisplay } from "../src/Platform/Circuits/DefaultReconnectDisplay";
import { AutoReconnectCircuitHandler } from "../src/Platform/Circuits/AutoReconnectCircuitHandler";
import {JSDOM} from 'jsdom';

describe('DefaultReconnectDisplay', () => {
Expand Down
7 changes: 4 additions & 3 deletions src/Components/Web.JS/tests/RenderQueue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down