UNPKG

alwaysai

Version:

The alwaysAI command-line interface (CLI)

13 lines (10 loc) 363 B
import { runAndCatch } from '@alwaysai/alwayscli'; import { prompt } from './prompt'; describe(prompt.name, () => { it('throws "This feature is disabled" if process.stdin is not a TTY', async () => { if (!process.stdin.isTTY) { const ex = await runAndCatch(prompt, []); expect(ex.message).toMatch(/This feature is disabled/i); } }); });