Skip to content

Commit 78fae77

Browse files
authored
Fix browser tests domain (#744)
Fix browser tests domain when used not against production
1 parent 9d96b06 commit 78fae77

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

packages/js-sdk/tests/runtimes/browser/run.test.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ function E2BTest() {
1212

1313
useEffect(() => {
1414
const getText = async () => {
15-
const sandbox = await Sandbox.create(template, { apiKey: inject('E2B_API_KEY') })
15+
const sandbox = await Sandbox.create(template, {
16+
apiKey: inject('E2B_API_KEY'),
17+
domain: inject('E2B_DOMAIN')
18+
})
1619

1720
try {
1821
await sandbox.commands.run('echo "Hello World" > hello.txt')

packages/js-sdk/vitest.workspace.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default defineWorkspace([
3434
},
3535
provide: {
3636
E2B_API_KEY: process.env.E2B_API_KEY || env.parsed?.E2B_API_KEY,
37+
E2B_DOMAIN: process.env.E2B_DOMAIN || env.parsed?.E2B_DOMAIN,
3738
},
3839
},
3940
},

0 commit comments

Comments
 (0)