Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Nov 13, 2023
1 parent 149217c commit 6f4cde6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/js-sdk/test/process.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,15 @@ test('test default on stdout/stderr', async () => {

await sandbox.close()
}, 10000)



test('test process start and wait', async () => {
const sandbox = await Sandbox.create(id)

const output = await sandbox.process.startAndWait('node -e "console.log(\'Hello\');"')

expect(output.exitCode).toEqual(0)

await sandbox.close()
})
14 changes: 14 additions & 0 deletions packages/python-sdk/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,17 @@ def test_process_default_on_stdout_stderr():
assert proc.exit_code == 1

sandbox.close()


def test_process_start_and_wait():
sandbox = Sandbox()
code = "node -e \"console.log('hello');\""

output = sandbox.process.start_and_wait(code)

proc = sandbox.process.start(code)
proc.wait()

assert output.exit_code == 0

sandbox.close()

0 comments on commit 6f4cde6

Please sign in to comment.