@magic-mustard/sqlsync
Version:
SQLSync simplifies database schema evolution by allowing a declarative approach to table management
31 lines (30 loc) • 999 B
JavaScript
;
// cli/index.test.ts
Object.defineProperty(exports, "__esModule", { value: true });
const index_1 = require("./index");
// Mock dependencies for testing
describe('SqlSyncCli', () => {
let cli;
beforeEach(() => {
cli = new index_1.SqlSyncCli();
});
it('should initialize with correct name, description, and version', () => {
cli.initCli();
const program = cli.program;
expect(program.name()).toBe('sqlsync');
expect(program.description()).toBe('Declarative SQL state management tool');
expect(program.version()).toBe('1.0.0');
});
it('should register all expected commands', () => {
cli.initCli();
const program = cli.program;
const commandNames = program.commands.map((cmd) => cmd.name());
expect(commandNames).toEqual(expect.arrayContaining([
'generate',
'sync',
'status',
'undo',
'migrations',
]));
});
});