Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Cleanup tests only in debug
Jakub Dobrý51e8f186e66c
diff --git a/packages/js-sdk/tests/sandbox/files/watch.test.ts b/packages/js-sdk/tests/sandbox/files/watch.test.tsindex 904e7a200..e585405cb 100644--- a/packages/js-sdk/tests/sandbox/files/watch.test.ts+++ b/packages/js-sdk/tests/sandbox/files/watch.test.ts@@ -1,6 +1,6 @@import { expect, onTestFinished } from 'vitest'-import { sandboxTest } from '../../setup.js'+import { isDebug, sandboxTest } from '../../setup.js'import { FilesystemEventType, NotFoundError, SandboxError } from '../../../src'sandboxTest('watch directory changes', async ({ sandbox }) => {@@ -39,7 +39,9 @@ sandboxTest('watch recursive directory changes', async ({ sandbox }) => {const newContent = 'This file has been modified.'await sandbox.files.makeDir(`${dirname}/${nestedDirname}`)- onTestFinished(() => sandbox.files.remove(dirname))+ if (isDebug) {+ onTestFinished(() => sandbox.files.remove(dirname))+ }await sandbox.files.write(`${dirname}/${nestedDirname}/${filename}`, content)@@ -72,7 +74,9 @@ sandboxTest('watch recursive directory after nested folder addition', async ({ sconst content = 'This file will be watched.'await sandbox.files.makeDir(dirname)- onTestFinished(() => sandbox.files.remove(dirname))+ if (isDebug) {+ onTestFinished(() => sandbox.files.remove(dirname))+ }let triggerFile: () => voidlet triggerFolder: () => void