cmte
Version:
Design by Committee™ except it's just you and LLMs
59 lines • 2.12 kB
JavaScript
import { describe, expect, test } from 'vitest';
import { OutputManager } from "../OutputManager.js";
describe('OutputManager', () => {
describe('getOutputPath', () => {
test('returns response output path for non-thinking task', () => {
const manager = new OutputManager(false, false);
const path = manager.getOutputPath({
basePath: '_output/test/task1',
isThinking: false
});
expect(path).toBe('_output/test/task1.o.md');
});
test('returns null for thinking task when showThinking is false', () => {
const manager = new OutputManager(false, false);
const path = manager.getOutputPath({
basePath: '_output/test/task1',
isThinking: true,
thinkingIndex: 0
});
expect(path).toBeNull();
});
test('returns thinking output path when showThinking is true', () => {
const manager = new OutputManager(true, false);
const path = manager.getOutputPath({
basePath: '_output/test/task1',
isThinking: true,
thinkingIndex: 0
});
expect(path).toBe('_output/test/task1-thinking-1.o.md');
});
});
describe('getPromptPath', () => {
test('returns null when showPrompts is false', () => {
const manager = new OutputManager(false, false);
const path = manager.getPromptPath({
basePath: '_output/test/task1',
isThinking: false
});
expect(path).toBeNull();
});
test('returns response prompt path when showPrompts is true', () => {
const manager = new OutputManager(false, true);
const path = manager.getPromptPath({
basePath: '_output/test/task1',
isThinking: false
});
expect(path).toBe('_output/test/task1.prompt.md');
});
test('returns thinking prompt path when showPrompts is true', () => {
const manager = new OutputManager(false, true);
const path = manager.getPromptPath({
basePath: '_output/test/task1',
isThinking: true,
thinkingIndex: 0
});
expect(path).toBe('_output/test/task1-thinking-1.prompt.md');
});
});
});