mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
test: align CI expectations with CLI cleanup
This commit is contained in:
parent
42cb3cb64b
commit
4a19ba5ce4
3 changed files with 9 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
import { readKtxSetupState } from '@ktx/context/project';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import {
|
||||
|
|
@ -203,7 +204,8 @@ describe('setup context build state', () => {
|
|||
expect.objectContaining({ onDetach: expect.any(Function) }),
|
||||
);
|
||||
expect(verifyContextReady).toHaveBeenCalledWith(tempDir);
|
||||
expect(await readFile(join(tempDir, 'ktx.yaml'), 'utf-8')).toContain(' - context');
|
||||
expect(await readFile(join(tempDir, 'ktx.yaml'), 'utf-8')).not.toContain('completed_steps:');
|
||||
expect((await readKtxSetupState(tempDir)).completed_steps).toContain('context');
|
||||
await expect(readKtxSetupContextState(tempDir)).resolves.toMatchObject({
|
||||
runId: 'setup-context-local-abc123',
|
||||
status: 'completed',
|
||||
|
|
@ -284,7 +286,8 @@ describe('setup context build state', () => {
|
|||
).resolves.toEqual({ status: 'ready', projectDir: tempDir, runId: 'setup-context-local-existing' });
|
||||
|
||||
expect(runContextBuildMock).not.toHaveBeenCalled();
|
||||
expect(await readFile(join(tempDir, 'ktx.yaml'), 'utf-8')).toContain(' - context');
|
||||
expect(await readFile(join(tempDir, 'ktx.yaml'), 'utf-8')).not.toContain('completed_steps:');
|
||||
expect((await readKtxSetupState(tempDir)).completed_steps).toContain('context');
|
||||
await expect(readKtxSetupContextState(tempDir)).resolves.toMatchObject({
|
||||
runId: 'setup-context-local-existing',
|
||||
status: 'completed',
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ describe('createKtxLlmProvider', () => {
|
|||
},
|
||||
{
|
||||
createAnthropic: vi.fn(() => vi.fn(() => anthropicModel)),
|
||||
devtoolsEnabled: false,
|
||||
wrapLanguageModel,
|
||||
devToolsMiddleware,
|
||||
} satisfies KtxLlmProviderFactoryDeps,
|
||||
|
|
@ -145,7 +146,7 @@ describe('createKtxLlmProvider', () => {
|
|||
modelSlots: { default: 'claude-sonnet-4-6' },
|
||||
promptCaching: { enabled: false },
|
||||
},
|
||||
{ createAnthropic },
|
||||
{ createAnthropic, devtoolsEnabled: false },
|
||||
);
|
||||
|
||||
expect(provider.getModel('default')).toBe(anthropicModel);
|
||||
|
|
@ -171,7 +172,7 @@ describe('createKtxLlmProvider', () => {
|
|||
modelSlots: { default: 'claude-sonnet-4-6' },
|
||||
promptCaching: { enabled: false },
|
||||
},
|
||||
{ createVertexAnthropic },
|
||||
{ createVertexAnthropic, devtoolsEnabled: false },
|
||||
);
|
||||
|
||||
expect(provider.getModel('default')).toBe(vertexModel);
|
||||
|
|
@ -191,7 +192,7 @@ describe('createKtxLlmProvider', () => {
|
|||
modelSlots: { default: 'anthropic/claude-sonnet-4-6' },
|
||||
promptCaching: { enabled: false },
|
||||
},
|
||||
{ createGateway },
|
||||
{ createGateway, devtoolsEnabled: false },
|
||||
);
|
||||
|
||||
expect(provider.getModel('curator')).toBe(gatewayModel);
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ describe('installed live-database artifact smoke helpers', () => {
|
|||
assert.deepEqual(buildLiveDatabaseIngestArgs('/tmp/project', 'http://127.0.0.1:8765'), [
|
||||
'exec',
|
||||
'ktx',
|
||||
'dev',
|
||||
'ingest',
|
||||
'run',
|
||||
'--project-dir',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue