mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-29 05:02:04 +03:00
test: make telegram network config hermetic
This commit is contained in:
@@ -29,6 +29,7 @@ describe("resolveTelegramAutoSelectFamilyDecision", () => {
|
|||||||
|
|
||||||
it("uses config override when provided", () => {
|
it("uses config override when provided", () => {
|
||||||
const decision = resolveTelegramAutoSelectFamilyDecision({
|
const decision = resolveTelegramAutoSelectFamilyDecision({
|
||||||
|
env: {},
|
||||||
network: { autoSelectFamily: true },
|
network: { autoSelectFamily: true },
|
||||||
nodeMajor: 22,
|
nodeMajor: 22,
|
||||||
});
|
});
|
||||||
@@ -36,12 +37,12 @@ describe("resolveTelegramAutoSelectFamilyDecision", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("defaults to disable on Node 22", () => {
|
it("defaults to disable on Node 22", () => {
|
||||||
const decision = resolveTelegramAutoSelectFamilyDecision({ nodeMajor: 22 });
|
const decision = resolveTelegramAutoSelectFamilyDecision({ env: {}, nodeMajor: 22 });
|
||||||
expect(decision).toEqual({ value: false, source: "default-node22" });
|
expect(decision).toEqual({ value: false, source: "default-node22" });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns null when no decision applies", () => {
|
it("returns null when no decision applies", () => {
|
||||||
const decision = resolveTelegramAutoSelectFamilyDecision({ nodeMajor: 20 });
|
const decision = resolveTelegramAutoSelectFamilyDecision({ env: {}, nodeMajor: 20 });
|
||||||
expect(decision).toEqual({ value: null });
|
expect(decision).toEqual({ value: null });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user