mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-25 08:48:08 +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
|
|
@ -9,7 +9,7 @@ import type {
|
|||
RunLocalScanOptions,
|
||||
} from '@ktx/context/scan';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { createCliScanProgress, runKtxScan } from './scan.js';
|
||||
import { createCliScanProgress, runKtxScan, type KtxScanDeps } from './scan.js';
|
||||
|
||||
const sqlServerExtractSchema = vi.hoisted(() =>
|
||||
vi.fn(async (connectionId: string) => ({
|
||||
|
|
@ -392,6 +392,7 @@ describe('runKtxScan', () => {
|
|||
}),
|
||||
);
|
||||
const io = makeIo();
|
||||
const runtimeIo = makeIo({ isTTY: true });
|
||||
|
||||
await expect(
|
||||
runKtxScan(
|
||||
|
|
@ -406,7 +407,9 @@ describe('runKtxScan', () => {
|
|||
runtimeInstallPolicy: 'auto',
|
||||
},
|
||||
io.io,
|
||||
{ runLocalScan, createLocalIngestAdapters },
|
||||
{ runLocalScan, createLocalIngestAdapters, runtimeIo: runtimeIo.io } as KtxScanDeps & {
|
||||
runtimeIo: typeof runtimeIo.io;
|
||||
},
|
||||
),
|
||||
).resolves.toBe(0);
|
||||
|
||||
|
|
@ -415,7 +418,7 @@ describe('runKtxScan', () => {
|
|||
cliVersion: '0.2.0',
|
||||
projectDir: tempDir,
|
||||
installPolicy: 'auto',
|
||||
io: io.io,
|
||||
io: runtimeIo.io,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue