Skip to content

Commit f458cba

Browse files
matej21claude
andcommitted
test: remove redundant default endpoint tests
The share endpoint always has a fallback value, so testing the "no endpoint" scenario is meaningless. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 19547d9 commit f458cba

2 files changed

Lines changed: 0 additions & 27 deletions

File tree

daemon/src/remote-feedback.test.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -162,22 +162,4 @@ describe("startRemoteFeedbackPoller", () => {
162162
expect(calls).toBe(0);
163163
});
164164

165-
test("uses default endpoint when CANVAS_SHARE_ENDPOINT not set", async () => {
166-
delete process.env.CANVAS_SHARE_ENDPOINT;
167-
168-
const sm = newSessionManager();
169-
const { shareId } = setupSession(sm);
170-
let capturedUrl = "";
171-
(globalThis as any).fetch = async (url: any) => {
172-
capturedUrl = String(url);
173-
return new Response(JSON.stringify({ entries: [] }), { status: 200 });
174-
};
175-
176-
const poller = startRemoteFeedbackPoller(sm, () => {}, "0.0.0");
177-
await new Promise((r) => setTimeout(r, 100));
178-
poller.stop();
179-
180-
expect(capturedUrl).toContain("canvas.contember.com");
181-
expect(capturedUrl).toContain(shareId);
182-
});
183165
});

daemon/src/share.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ afterEach(() => {
3232
});
3333

3434
describe("loadShareConfig", () => {
35-
test("returns default endpoint when env not set", () => {
36-
const before = process.env.CANVAS_SHARE_ENDPOINT;
37-
delete process.env.CANVAS_SHARE_ENDPOINT;
38-
const cfg = loadShareConfig("0.0.0");
39-
expect(cfg).not.toBeNull();
40-
expect(cfg?.endpoint).toBe("https://canvas.contember.com");
41-
if (before) process.env.CANVAS_SHARE_ENDPOINT = before;
42-
});
43-
4435
test("strips trailing slashes", () => {
4536
process.env.CANVAS_SHARE_ENDPOINT = "https://example.com/";
4637
const cfg = loadShareConfig("0.0.0");

0 commit comments

Comments
 (0)