import { describe, it, expect } from 'vitest'; import { createTextCommand } from '../../../../src/presentation/cli/commands/textCommand.js'; describe('textCommand', () => { it('Commandオブジェクトを返す', () => { const command = createTextCommand(); expect(command).toBeDefined(); expect(command.name()).toBe('text'); }); it('正しい説明を持つ', () => { const command = createTextCommand(); expect(command.description()).toContain('テキスト教材'); }); it('ファイル引数を持つ', () => { const command = createTextCommand(); const args = command.registeredArguments; expect(args.length).toBeGreaterThan(0); expect(args[0].name()).toBe('file'); }); it('--formatオプションを持つ', () => { const command = createTextCommand(); const formatOption = command.options.find(opt => opt.long === '--format'); expect(formatOption).toBeDefined(); }); });