mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 08:10:21 +00:00
* 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
35 lines
916 B
TypeScript
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,
|
|
});
|
|
});
|
|
});
|