Skip to content

Commit

Permalink
fix(server): Add test for new logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
dethell committed Jun 13, 2024
1 parent 33ccdbf commit 7e65e90
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/server/context-registry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ describe("a context registry", () => {
expect(registry.find("/hello/world")).toBe(helloContext);
});

it("finds a context at a parent path with alternate casing", () => {
const helloContext = { name: "hello" };

const registry = new ContextRegistry();

registry.add("/hello", helloContext);

expect(registry.find("/Hello/world")).toBe(helloContext);
});

it("returns an empty object when there is no matching context", () => {
const helloContext = { name: "hello" };

Expand Down

0 comments on commit 7e65e90

Please sign in to comment.