Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

374 B
Raw Blame
import { expect } from 'vitest'
import { sandboxTest } from '../../setup'

sandboxTest('send input', async ({ sandbox }) => {
  const terminal = await sandbox.pty.create({
    cols: 80,
    rows: 24,
    onData: () => null,
  })

  await sandbox.pty.sendInput(terminal.pid, new TextEncoder().encode('exit\n'))

  await terminal.wait()
  expect(terminal.exitCode).toBe(0)
})