keyless-smoke.e2e.ts 1.0 KB

1234567891011121314151617181920212223
  1. import { fileURLToPath } from 'node:url'
  2. import { describe, expect, it } from 'vitest'
  3. import { LOADER_SMOKE_TEST_TIMEOUT_MS } from '@deepseek-ai/dsh-loader-smoke'
  4. import { runTuiPtySmoke } from '../../tui-agent/tests/pty-harness.ts'
  5. const binScript = fileURLToPath(new URL('../../../packages/examples/tui-demo/src/bin.ts', import.meta.url))
  6. const configPath = fileURLToPath(new URL('../cordis.yml', import.meta.url))
  7. const tsconfigPath = fileURLToPath(new URL('../../../tsconfig.json', import.meta.url))
  8. describe('cordis-agent keyless smoke (real Loader tree in a PTY)', () => {
  9. it('boots the full tool-cordis tree and exits cleanly through the TUI', async () => {
  10. const output = await runTuiPtySmoke({
  11. label: 'cordis-agent',
  12. tempDirPrefix: 'cordis-agent-smoke-',
  13. binScript,
  14. configPath,
  15. tsconfigPath,
  16. env: { DEEPSEEK_API_KEY: 'keyless-smoke-no-call' },
  17. actions: [{ waitFor: 'cordis-agent ready.', send: '/exit\r' }],
  18. })
  19. expect(output).toContain('cordis-agent ready.')
  20. }, LOADER_SMOKE_TEST_TIMEOUT_MS)
  21. })