semantic-ds-toolkit
Version:
Performance-first semantic layer for modern data stacks - Stable Column Anchors & intelligent inference
39 lines • 1.67 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
jest.mock('chalk', () => {
const chain = new Proxy((s) => (typeof s === 'string' ? s : ''), {
get: () => chain,
apply: (_t, _a, args) => (args && typeof args[0] === 'string' ? args[0] : '')
});
return { __esModule: true, default: chain, ...chain };
});
jest.mock('inquirer', () => {
const responses = [
{ name: 'proj', description: 'desc' }, // gatherProjectInfo
{ template: 'quickstart' }, // selectTemplate
{ proceed: true }, // non-empty dir proceed
{ confirm: true } // confirmAndCreate
];
return {
__esModule: true,
default: { prompt: jest.fn(() => Promise.resolve(responses.shift() || {})) },
prompt: jest.fn(() => Promise.resolve(responses.shift() || {}))
};
});
// Mock ora spinner to avoid ESM import issues and side effects
jest.mock('ora', () => {
const spinner = { succeed: () => { }, fail: () => { }, stop: () => { }, text: '' };
const factory = (_text) => ({ ...spinner, start: () => spinner });
return { __esModule: true, default: factory };
});
const interactive_init_1 = require("../../src/cli/interactive-init");
describe('CLI: InteractiveInitWizard (dry-run)', () => {
const logSpy = jest.spyOn(console, 'log').mockImplementation(() => { });
afterAll(() => logSpy.mockRestore());
it('prints a dry-run plan without writing files', async () => {
const wiz = new interactive_init_1.InteractiveInitWizard(true);
await wiz.run();
expect(logSpy).toHaveBeenCalled();
});
});
//# sourceMappingURL=interactive-init.test.js.map