Skip to content

armgit / E2B

Public Imported from GitHub
0

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

fix: CLI tests setup (#969)

Jakub Dobryc2cc1469f62b
diff --git a/packages/cli/tests/setup.ts b/packages/cli/tests/setup.ts
index 6a82030ab..9f04ae115 100644
--- a/packages/cli/tests/setup.ts
+++ b/packages/cli/tests/setup.ts
@@ -1,6 +1,5 @@
import { execSync } from 'node:child_process'
-import { beforeAll } from 'vitest'
-beforeAll(() => {
+export async function setup() {
execSync('pnpm build', { stdio: 'inherit' })
-})
+}
diff --git a/packages/cli/vitest.config.ts b/packages/cli/vitest.config.ts
index 9076f4f8f..01f8d84dd 100644
--- a/packages/cli/vitest.config.ts
+++ b/packages/cli/vitest.config.ts
@@ -8,7 +8,7 @@ export default defineConfig({
testTimeout: 30_000,
include: ['tests/**/*.test.ts'],
exclude: ['node_modules', 'dist', 'testground'],
- setupFiles: ['tests/setup.ts'],
+ globalSetup: ['tests/setup.ts'],
},
resolve: {
alias: {