mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-28 08:49:38 +02:00
fix(cli): auto-install runtime during setup (#116)
* fix(cli): auto-install runtime during setup * test: align docs smoke with readme
This commit is contained in:
parent
42b688e934
commit
a72fca2b32
11 changed files with 131 additions and 23 deletions
|
|
@ -994,6 +994,37 @@ describe('runContextBuild', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('threads the original runtime IO into captured target execution', async () => {
|
||||
const io = makeIo({ isTTY: true });
|
||||
const project = projectWithConnections({
|
||||
warehouse: { driver: 'postgres', context: { queryHistory: { enabled: true } } },
|
||||
});
|
||||
const executeTarget = vi.fn(async (target) => successResult(target.connectionId, target.driver, target.operation));
|
||||
|
||||
await runContextBuild(
|
||||
project,
|
||||
{
|
||||
projectDir: '/tmp/project',
|
||||
inputMode: 'auto',
|
||||
cliVersion: '0.2.0',
|
||||
runtimeInstallPolicy: 'auto',
|
||||
},
|
||||
io.io,
|
||||
{ executeTarget, now: () => 1000 },
|
||||
);
|
||||
|
||||
expect(executeTarget).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ connectionId: 'warehouse' }),
|
||||
expect.objectContaining({ runtimeInstallPolicy: 'auto' }),
|
||||
expect.objectContaining({
|
||||
stdout: expect.objectContaining({ isTTY: false }),
|
||||
}),
|
||||
expect.objectContaining({
|
||||
runtimeIo: io.io,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it('calls onSourceProgress when sources start and finish', async () => {
|
||||
const io = makeIo();
|
||||
const project = projectWithConnections({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue