mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 04:11:22 +00:00
style: format tests and helpers
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import {
|
||||
buildSandboxCreateArgs,
|
||||
type SandboxDockerConfig,
|
||||
} from "./sandbox.js";
|
||||
import { buildSandboxCreateArgs, type SandboxDockerConfig } from "./sandbox.js";
|
||||
|
||||
describe("buildSandboxCreateArgs", () => {
|
||||
it("includes hardening and resource flags", () => {
|
||||
|
||||
@@ -60,10 +60,7 @@ export type SandboxDockerConfig = {
|
||||
memory?: string | number;
|
||||
memorySwap?: string | number;
|
||||
cpus?: number;
|
||||
ulimits?: Record<
|
||||
string,
|
||||
string | number | { soft?: number; hard?: number }
|
||||
>;
|
||||
ulimits?: Record<string, string | number | { soft?: number; hard?: number }>;
|
||||
seccompProfile?: string;
|
||||
apparmorProfile?: string;
|
||||
dns?: string[];
|
||||
|
||||
@@ -219,7 +219,8 @@ describe("buildWorkspaceSkillsPrompt", () => {
|
||||
dir: path.join(skillsDir, "anybin-skill"),
|
||||
name: "anybin-skill",
|
||||
description: "Needs any bin",
|
||||
metadata: '{"clawdbot":{"requires":{"anyBins":["missingbin","fakebin"]}}}',
|
||||
metadata:
|
||||
'{"clawdbot":{"requires":{"anyBins":["missingbin","fakebin"]}}}',
|
||||
});
|
||||
await writeSkill({
|
||||
dir: path.join(skillsDir, "config-skill"),
|
||||
|
||||
@@ -289,7 +289,9 @@ function resolveClawdbotMetadata(
|
||||
const osRaw = normalizeStringList(clawdbotObj.os);
|
||||
return {
|
||||
always:
|
||||
typeof clawdbotObj.always === "boolean" ? clawdbotObj.always : undefined,
|
||||
typeof clawdbotObj.always === "boolean"
|
||||
? clawdbotObj.always
|
||||
: undefined,
|
||||
emoji:
|
||||
typeof clawdbotObj.emoji === "string" ? clawdbotObj.emoji : undefined,
|
||||
homepage:
|
||||
|
||||
Reference in New Issue
Block a user