Merge pull request #47 from Kaelio/luca-martial/save-setup-in-dot-ktx

Save setup completion state in .ktx/setup/state.json
This commit is contained in:
Luca Martial 2026-05-12 19:27:26 -04:00 committed by GitHub
commit e13350c970
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 226 additions and 111 deletions

View file

@ -839,7 +839,10 @@ describe('setup status', () => {
).resolves.toBe(0);
await expect(stat(join(tempDir, 'ktx.yaml'))).resolves.toBeDefined();
expect(await readFile(join(tempDir, 'ktx.yaml'), 'utf-8')).toContain('completed_steps:');
expect(await readFile(join(tempDir, 'ktx.yaml'), 'utf-8')).not.toContain('completed_steps:');
await expect(readFile(join(tempDir, '.ktx', 'setup', 'state.json'), 'utf-8')).resolves.toBe(
`${JSON.stringify({ completed_steps: ['project', 'sources'] }, null, 2)}\n`,
);
expect(testIo.stdout()).toContain('KTX setup');
expect(testIo.stdout()).toContain(`Project: ${tempDir}`);
expect(testIo.stdout()).toContain('Project ready: yes');