Skip to content

Commit 5db3a8a

Browse files
test: add Node.js unit tests for sessionIdleTimeoutSeconds
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f614e6c commit 5db3a8a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

nodejs/test/client.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,4 +1258,23 @@ describe("CopilotClient", () => {
12581258
rpcSpy.mockRestore();
12591259
});
12601260
});
1261+
1262+
describe("sessionIdleTimeoutSeconds", () => {
1263+
it("should default to 0 when not specified", () => {
1264+
const client = new CopilotClient({
1265+
logLevel: "error",
1266+
});
1267+
1268+
expect((client as any).options.sessionIdleTimeoutSeconds).toBe(0);
1269+
});
1270+
1271+
it("should store a custom value", () => {
1272+
const client = new CopilotClient({
1273+
sessionIdleTimeoutSeconds: 600,
1274+
logLevel: "error",
1275+
});
1276+
1277+
expect((client as any).options.sessionIdleTimeoutSeconds).toBe(600);
1278+
});
1279+
});
12611280
});

0 commit comments

Comments
 (0)