2ba2f8f5f7
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { describe, expect, test } from "bun:test"
|
|
|
|
import { isTaskSystemEnabled } from "./task-system-enabled"
|
|
|
|
describe("isTaskSystemEnabled", () => {
|
|
describe("#given experimental.task_system is omitted", () => {
|
|
test("#when resolving #then it defaults to false", () => {
|
|
// given
|
|
const config = {}
|
|
|
|
// when
|
|
const result = isTaskSystemEnabled(config)
|
|
|
|
// then
|
|
expect(result).toBe(false)
|
|
})
|
|
})
|
|
|
|
describe("#given experimental.task_system is enabled", () => {
|
|
test("#when resolving #then it returns true", () => {
|
|
// given
|
|
const config = { experimental: { task_system: true } }
|
|
|
|
// when
|
|
const result = isTaskSystemEnabled(config)
|
|
|
|
// then
|
|
expect(result).toBe(true)
|
|
})
|
|
})
|
|
|
|
describe("#given experimental.task_system is disabled", () => {
|
|
test("#when resolving #then it returns false", () => {
|
|
// given
|
|
const config = { experimental: { task_system: false } }
|
|
|
|
// when
|
|
const result = isTaskSystemEnabled(config)
|
|
|
|
// then
|
|
expect(result).toBe(false)
|
|
})
|
|
})
|
|
})
|