/ opencodehub / cli / src / smoke.test.ts
swadhinbiswas # Changelog · 1/17/2026
9eabb75
16 lines · 527 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { describe, it, expect } from 'vitest';
import { execSync } from 'child_process';

describe('CLI Smoke Test', () => {
    it('should show help menu', () => {
        const output = execSync('node dist/bin/och.js --help').toString();
        expect(output).toContain('OpenCodeHub CLI');
        expect(output).toContain('Usage: och');
    });

    it('should show version', () => {
        const output = execSync('node dist/bin/och.js --version').toString();
        expect(output).toMatch(/\d+\.\d+\.\d+/);
    });
});