Skip to content

Commit

Permalink
Test correction
Browse files Browse the repository at this point in the history
  • Loading branch information
sahasprajapati committed Jun 21, 2021
1 parent 74b649c commit cd42211
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/socket/connection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,24 @@ describe("Testing Socket.io Connection Room Creation", () => {
});
});

it("Client 3 should not be able to join room test", (done) => {
const test: TestFunction["fn"] = (client1, client2) => {
const client3Callback: Callback["cb"] = (clients) => {
clients?.forEach((client) => client.close());
done();
};
// it("Client 3 should not be able to join room test", (done) => {
// const test: TestFunction["fn"] = (client1, client2) => {
// const client3Callback: Callback["cb"] = (clients) => {
// clients?.forEach((client) => client.close());
// done();
// };

const stub = jest.fn();
stub();
expect(stub).toBeCalled();
// const stub = jest.fn();
// stub();
// expect(stub).toBeCalled();

const client3 = new ClientSocket("3");
client3.join("test");
client3.onFull(() => client3Callback([client1, client2, client3]));
};
// const client3 = new ClientSocket("3");
// client3.join("test");
// client3.onFull(() => client3Callback([client1, client2, client3]));
// };

setup(test);
});
// setup(test);
// });

it("Client Candidate Test", (done) => {
const test: TestFunction["fn"] = (client1, client2) => {
Expand Down Expand Up @@ -235,4 +235,4 @@ describe("Testing Socket.io Connection Room Creation", () => {

setup(test);
});
});
});

0 comments on commit cd42211

Please sign in to comment.