mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 09:11:26 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
describe("profile name validation", () => {
|
||||
it("accepts valid lowercase names", () => {
|
||||
expect(isValidProfileName("clawd")).toBe(true);
|
||||
expect(isValidProfileName("openclaw")).toBe(true);
|
||||
expect(isValidProfileName("work")).toBe(true);
|
||||
expect(isValidProfileName("my-profile")).toBe(true);
|
||||
expect(isValidProfileName("test123")).toBe(true);
|
||||
@@ -109,7 +109,7 @@ describe("getUsedPorts", () => {
|
||||
|
||||
it("extracts ports from profile configs", () => {
|
||||
const profiles = {
|
||||
clawd: { cdpPort: 18792 },
|
||||
openclaw: { cdpPort: 18792 },
|
||||
work: { cdpPort: 18793 },
|
||||
personal: { cdpPort: 18795 },
|
||||
};
|
||||
@@ -147,7 +147,7 @@ describe("port collision prevention", () => {
|
||||
// Raw config shows empty - no ports used
|
||||
expect(usedFromRaw.size).toBe(0);
|
||||
|
||||
// But resolved config has implicit clawd at 18800
|
||||
// But resolved config has implicit openclaw at 18800
|
||||
const resolved = resolveBrowserConfig({});
|
||||
const usedFromResolved = getUsedPorts(resolved.profiles);
|
||||
expect(usedFromResolved.has(CDP_PORT_RANGE_START)).toBe(true);
|
||||
@@ -165,7 +165,7 @@ describe("port collision prevention", () => {
|
||||
// Raw config: first allocation gets 18800
|
||||
expect(buggyAllocatedPort).toBe(CDP_PORT_RANGE_START);
|
||||
|
||||
// Resolved config: includes implicit clawd at 18800
|
||||
// Resolved config: includes implicit openclaw at 18800
|
||||
const resolved = resolveBrowserConfig(rawConfig.browser);
|
||||
const fixedUsedPorts = getUsedPorts(resolved.profiles);
|
||||
const fixedAllocatedPort = allocateCdpPort(fixedUsedPorts);
|
||||
@@ -238,7 +238,7 @@ describe("getUsedColors", () => {
|
||||
|
||||
it("extracts and uppercases colors from profile configs", () => {
|
||||
const profiles = {
|
||||
clawd: { color: "#ff4500" },
|
||||
openclaw: { color: "#ff4500" },
|
||||
work: { color: "#0066CC" },
|
||||
};
|
||||
const used = getUsedColors(profiles);
|
||||
|
||||
Reference in New Issue
Block a user