Skip to content

Commit

Permalink
Run only test with warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Stadermann committed Sep 17, 2024
1 parent 4f9602c commit c00ca25
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions typescript/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,21 +329,21 @@ describe("Vaas", () => {
let webSocket: WebSocket.WebSocket;
let vaas: Vaas;

beforeEach(async () => {
webSocket = {
readyState: WebSocket.WebSocket.CONNECTING as number,
onopen: () => { },
onclose: () => { },
onmessage: () => { },
send: (data: any) => { },
close: () => { },
} as any;
vaas = new Vaas((url) => webSocket);
});

afterEach(() => {
vaas.close();
});
// beforeEach(async () => {
// webSocket = {
// readyState: WebSocket.WebSocket.CONNECTING as number,
// onopen: () => { },
// onclose: () => { },
// onmessage: () => { },
// send: (data: any) => { },
// close: () => { },
// } as any;
// vaas = new Vaas((url) => webSocket);
// });

// afterEach(() => {
// vaas.close();
// });

methodsAndParams.forEach(async ([method, params]) => {
describe(`#${method}()`, () => {
Expand Down Expand Up @@ -392,18 +392,18 @@ describe("Vaas", () => {
}
});

// it("throws if authentication failed", async () => {
// const v = new Vaas();
// try {
// await expect(
// () => v.connect("token", VAAS_URL),
// ).rejects.toThrow(VaasAuthenticationError);
// await expect(() => (v as any)[method](...params)).rejects.toThrow(VaasAuthenticationError);
// }
// finally {
// v.close();
// }
// });
fit("throws if authentication failed", async () => {
const v = new Vaas();
try {
await expect(
() => v.connect("token", VAAS_URL),
).rejects.toThrow(VaasAuthenticationError);
await expect(() => (v as any)[method](...params)).rejects.toThrow(VaasAuthenticationError);
}
finally {
v.close();
}
});
});
});
});

0 comments on commit c00ca25

Please sign in to comment.