Skip to content

Commit

Permalink
add http test
Browse files Browse the repository at this point in the history
  • Loading branch information
endel committed Jan 17, 2024
1 parent 1f2208d commit 2da665c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/http_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import './util';
import assert from "assert";
import { Client, Room } from "../src";

describe("HTTP", function() {
let client: Client;

before(() => {
client = new Client("ws://localhost:4545");
});

describe("errors", () => {
it("should return 'offline' error when requesting offline service", async () => {
try {
await client.http.post("/anything");
} catch (e) {
console.log({code: e.code, message: e.message});
console.log(e);
}
});
});

});

0 comments on commit 2da665c

Please sign in to comment.