fix(delegate-task): reset model cache between tests
This commit is contained in:
parent
aa6355cc46
commit
71474bb4a2
@ -1,12 +1,18 @@
|
|||||||
import { describe, test, expect } from "bun:test"
|
import { describe, test, expect, beforeEach } from "bun:test"
|
||||||
import { DEFAULT_CATEGORIES, CATEGORY_PROMPT_APPENDS, CATEGORY_DESCRIPTIONS } from "./constants"
|
import { DEFAULT_CATEGORIES, CATEGORY_PROMPT_APPENDS, CATEGORY_DESCRIPTIONS } from "./constants"
|
||||||
import { resolveCategoryConfig } from "./tools"
|
import { resolveCategoryConfig } from "./tools"
|
||||||
import type { CategoryConfig } from "../../config/schema"
|
import type { CategoryConfig } from "../../config/schema"
|
||||||
|
import { __resetModelCache } from "../../shared/model-availability"
|
||||||
|
|
||||||
// Test constants - systemDefaultModel is required by resolveCategoryConfig
|
// Test constants - systemDefaultModel is required by resolveCategoryConfig
|
||||||
const SYSTEM_DEFAULT_MODEL = "anthropic/claude-sonnet-4-5"
|
const SYSTEM_DEFAULT_MODEL = "anthropic/claude-sonnet-4-5"
|
||||||
|
|
||||||
describe("sisyphus-task", () => {
|
describe("sisyphus-task", () => {
|
||||||
|
// Reset model cache before each test to prevent cross-test pollution
|
||||||
|
beforeEach(() => {
|
||||||
|
__resetModelCache()
|
||||||
|
})
|
||||||
|
|
||||||
describe("DEFAULT_CATEGORIES", () => {
|
describe("DEFAULT_CATEGORIES", () => {
|
||||||
test("visual-engineering category has model config", () => {
|
test("visual-engineering category has model config", () => {
|
||||||
// #given
|
// #given
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user