mini: add replay settings to cli config (#38487)
This commit is contained in:
parent
b6f85c2250
commit
52c98a4eeb
5 changed files with 28 additions and 6 deletions
|
|
@ -1,13 +1,25 @@
|
|||
/** @jsxImportSource @opentui/solid */
|
||||
import { testRender } from "@opentui/solid"
|
||||
import { expect, test } from "bun:test"
|
||||
import { Schema } from "effect"
|
||||
import {
|
||||
resolve,
|
||||
ConfigProvider,
|
||||
Info,
|
||||
useConfig,
|
||||
type Interface,
|
||||
} from "../src/config"
|
||||
|
||||
test("validates mini replay settings", () => {
|
||||
const decode = Schema.decodeUnknownSync(Info)
|
||||
|
||||
expect(decode({ mini: { replay: false, replay_limit: 50 } })).toEqual({
|
||||
mini: { replay: false, replay_limit: 50 },
|
||||
})
|
||||
expect(() => decode({ mini: { replay_limit: 0 } })).toThrow()
|
||||
expect(() => decode({ mini: { replay_limit: 1.5 } })).toThrow()
|
||||
})
|
||||
|
||||
test("resolves nested config and keybind defaults", () => {
|
||||
const config = resolve(
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue