chore: delete unused util/color module (#27331)
This commit is contained in:
parent
bc25342f34
commit
bebe5442a5
2 changed files with 1 additions and 34 deletions
|
|
@ -1,9 +1,8 @@
|
|||
import { test, expect } from "bun:test"
|
||||
import { expect } from "bun:test"
|
||||
import { Effect, Layer } from "effect"
|
||||
import { CrossSpawnSpawner } from "@opencode-ai/core/cross-spawn-spawner"
|
||||
import { Config } from "@/config/config"
|
||||
import { Agent as AgentSvc } from "../../src/agent/agent"
|
||||
import { Color } from "@/util/color"
|
||||
import { testEffect } from "../lib/effect"
|
||||
|
||||
const it = testEffect(Layer.mergeAll(Config.defaultLayer, AgentSvc.defaultLayer, CrossSpawnSpawner.defaultLayer))
|
||||
|
|
@ -46,16 +45,3 @@ it.instance(
|
|||
},
|
||||
},
|
||||
)
|
||||
|
||||
test("Color.hexToAnsiBold converts valid hex to ANSI", () => {
|
||||
const result = Color.hexToAnsiBold("#FFA500")
|
||||
expect(result).toBe("\x1b[38;2;255;165;0m\x1b[1m")
|
||||
})
|
||||
|
||||
test("Color.hexToAnsiBold returns undefined for invalid hex", () => {
|
||||
expect(Color.hexToAnsiBold(undefined)).toBeUndefined()
|
||||
expect(Color.hexToAnsiBold("")).toBeUndefined()
|
||||
expect(Color.hexToAnsiBold("#FFF")).toBeUndefined()
|
||||
expect(Color.hexToAnsiBold("FFA500")).toBeUndefined()
|
||||
expect(Color.hexToAnsiBold("#GGGGGG")).toBeUndefined()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue