Files
openclaw/extensions/bluebubbles/src/doctor.test.ts
Vincent Koc c863ee1b86 fix(config): migrate bundled private-network aliases (#60862)
* refactor(plugin-sdk): centralize private-network opt-in semantics

* fix(config): migrate bundled private-network aliases

* fix(config): add bundled private-network doctor adapters

* fix(config): expose bundled channel migration hooks

* fix(config): prefer canonical private-network key

* test(config): refresh rebased private-network outputs
2026-04-05 08:49:44 +01:00

35 lines
916 B
TypeScript

import { describe, expect, it } from "vitest";
import { bluebubblesDoctor } from "./doctor.js";
describe("bluebubbles doctor", () => {
it("normalizes legacy private-network aliases", () => {
const normalize = bluebubblesDoctor.normalizeCompatibilityConfig;
expect(normalize).toBeDefined();
if (!normalize) {
return;
}
const result = normalize({
cfg: {
channels: {
bluebubbles: {
allowPrivateNetwork: true,
accounts: {
default: {
allowPrivateNetwork: false,
},
},
},
},
} as never,
});
expect(result.config.channels?.bluebubbles?.network).toEqual({
dangerouslyAllowPrivateNetwork: true,
});
expect(result.config.channels?.bluebubbles?.accounts?.default?.network).toEqual({
dangerouslyAllowPrivateNetwork: false,
});
});
});