Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Add test

Jakub Novakf20415294e14
diff --git a/packages/js-sdk/tests/sandbox/files/makeDir.test.ts b/packages/js-sdk/tests/sandbox/files/makeDir.test.ts
index 5a3c752cc..c4f15960c 100644
--- a/packages/js-sdk/tests/sandbox/files/makeDir.test.ts
+++ b/packages/js-sdk/tests/sandbox/files/makeDir.test.ts
@@ -10,6 +10,17 @@ sandboxTest('make directory', async ({ sandbox }) => {
assert.isTrue(exists)
})
+sandboxTest('make existing directory', async ({ sandbox }) => {
+ const dirName = 'test_directory'
+
+ await sandbox.files.makeDir(dirName)
+ const exists = await sandbox.files.exists(dirName)
+ assert.isTrue(exists)
+
+ const exists2 = await sandbox.files.makeDir(dirName)
+ assert.isFalse(exists2)
+})
+
sandboxTest('make nested directory', async ({ sandbox }) => {
const nestedDirName = 'test_directory/nested_directory'