mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 13:28:38 +00:00
adding config layer
This commit is contained in:
32
extensions/diffs/src/config.test.ts
Normal file
32
extensions/diffs/src/config.test.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { DEFAULT_DIFFS_TOOL_DEFAULTS, resolveDiffsPluginDefaults } from "./config.js";
|
||||
|
||||
describe("resolveDiffsPluginDefaults", () => {
|
||||
it("returns built-in defaults when config is missing", () => {
|
||||
expect(resolveDiffsPluginDefaults(undefined)).toEqual(DEFAULT_DIFFS_TOOL_DEFAULTS);
|
||||
});
|
||||
|
||||
it("applies configured defaults from plugin config", () => {
|
||||
expect(
|
||||
resolveDiffsPluginDefaults({
|
||||
defaults: {
|
||||
fontFamily: "JetBrains Mono",
|
||||
fontSize: 17,
|
||||
layout: "split",
|
||||
wordWrap: false,
|
||||
background: false,
|
||||
theme: "light",
|
||||
mode: "view",
|
||||
},
|
||||
}),
|
||||
).toEqual({
|
||||
fontFamily: "JetBrains Mono",
|
||||
fontSize: 17,
|
||||
layout: "split",
|
||||
wordWrap: false,
|
||||
background: false,
|
||||
theme: "light",
|
||||
mode: "view",
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user