mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-04-20 03:02:51 -04:00
Split smoke, core, and prompt-module suites and make test:e2e self-contained with an explicit build step and version-check bypass. Move core CLI coverage to a process-based harness with mock OpenAI boundary checks, add user-path scenarios, refresh CI jobs, and commit the rebuilt out/cli.cjs artifact.
23 lines
586 B
TypeScript
23 lines
586 B
TypeScript
import 'cli-testing-library/extend-expect';
|
|
import { prepareEnvironment, runCli, waitForExit } from './utils';
|
|
|
|
it('cli flow when there are no changes', async () => {
|
|
const { gitDir, cleanup } = await prepareEnvironment();
|
|
|
|
try {
|
|
const oco = await runCli([], {
|
|
cwd: gitDir,
|
|
env: {
|
|
OCO_AI_PROVIDER: 'openai',
|
|
OCO_API_KEY: 'dummy-openai-key',
|
|
OCO_GITPUSH: 'false'
|
|
}
|
|
});
|
|
|
|
expect(await oco.findByText('No changes detected')).toBeInTheConsole();
|
|
expect(await waitForExit(oco)).toBe(1);
|
|
} finally {
|
|
await cleanup();
|
|
}
|
|
});
|