1Branch0Tags
GL
glucryptoRefresh package-lock for opentool 0.19.5
01acdef14 hours ago17Commits
typescript
import { describe, expect, test } from "bun:test"; import { resolveConfiguredMarketSymbol, resolveRuntimeConfig } from "./config"; describe("news-bot market symbol resolution", () => { test("prefers explicit marketSymbol for replay and execution", () => { const config = resolveRuntimeConfig({ asset: "WTI", marketSymbol: "xyz:CL", execution: { enabled: false, symbol: "WTI", }, }); expect(resolveConfiguredMarketSymbol(config)).toBe("xyz:CL"); }); test("falls back to execution.symbol before asset label", () => { const config = resolveRuntimeConfig({ asset: "HYPE", execution: { enabled: false, symbol: "HYPE-USDC", }, }); expect(resolveConfiguredMarketSymbol(config)).toBe("HYPE-USDC"); }); test("falls back to the configured asset for perp execution", () => { const config = resolveRuntimeConfig({ asset: "BTC", }); expect(resolveConfiguredMarketSymbol(config)).toBe("BTC"); }); });