Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Increase test timeouts

Jakub Novakd5be96d4c4dd
diff --git a/packages/js-sdk/tests/runtimes/browser/run.test.tsx b/packages/js-sdk/tests/runtimes/browser/run.test.tsx
index ce01a8a80..293edf518 100644
--- a/packages/js-sdk/tests/runtimes/browser/run.test.tsx
+++ b/packages/js-sdk/tests/runtimes/browser/run.test.tsx
@@ -27,9 +27,9 @@ test(
await waitFor(
() => expect.element(getByText('Hello World')).toBeInTheDocument(),
{
- timeout: 10_000,
+ timeout: 30_000,
}
)
},
- { timeout: 20000 }
+ { timeout: 40_000 }
)
diff --git a/packages/js-sdk/tests/runtimes/bun/run.test.ts b/packages/js-sdk/tests/runtimes/bun/run.test.ts
index 4fd17ff63..6fc440243 100644
--- a/packages/js-sdk/tests/runtimes/bun/run.test.ts
+++ b/packages/js-sdk/tests/runtimes/bun/run.test.ts
@@ -2,19 +2,23 @@ import { expect, test } from 'bun:test'
import { Sandbox } from '../../../src'
-test('Bun test', async () => {
- const sbx = await Sandbox.create('base', { timeoutMs: 5_000 })
- try {
- const isRunning = await sbx.isRunning()
- expect(isRunning).toBeTruthy()
+test(
+ 'Bun test',
+ async () => {
+ const sbx = await Sandbox.create('base', { timeoutMs: 5_000 })
+ try {
+ const isRunning = await sbx.isRunning()
+ expect(isRunning).toBeTruthy()
- const text = 'Hello, World!'
+ const text = 'Hello, World!'
- const cmd = await sbx.commands.run(`echo "${text}"`)
+ const cmd = await sbx.commands.run(`echo "${text}"`)
- expect(cmd.exitCode).toBe(0)
- expect(cmd.stdout).toEqual(`${text}\n`)
- } finally {
- await sbx.kill()
- }
-})
+ expect(cmd.exitCode).toBe(0)
+ expect(cmd.stdout).toEqual(`${text}\n`)
+ } finally {
+ await sbx.kill()
+ }
+ },
+ { timeout: 20_000 }
+)
diff --git a/packages/js-sdk/vitest.workspace.mts b/packages/js-sdk/vitest.workspace.mts
index bac44172f..8ce2118f6 100644
--- a/packages/js-sdk/vitest.workspace.mts
+++ b/packages/js-sdk/vitest.workspace.mts
@@ -18,7 +18,7 @@ export default defineWorkspace([
},
},
globals: false,
- testTimeout: 20000,
+ testTimeout: 30000,
environment: 'node',
bail: 1,
server: {},