From 2da86abcb9fe95eae1d88b1ba77ce990cd0fcaec Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 23:16:29 +0000 Subject: [PATCH] test: add validation test for folder/workspace mutual exclusion --- registry/coder/modules/vscode-web/main.test.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/registry/coder/modules/vscode-web/main.test.ts b/registry/coder/modules/vscode-web/main.test.ts index 860fc176..e415fa7d 100644 --- a/registry/coder/modules/vscode-web/main.test.ts +++ b/registry/coder/modules/vscode-web/main.test.ts @@ -38,5 +38,17 @@ describe("vscode-web", async () => { expect(t).toThrow("Offline mode does not allow extensions to be installed"); }); + it("folder and workspace can not be used together", () => { + const t = async () => { + await runTerraformApply(import.meta.dir, { + agent_id: "foo", + accept_license: "true", + folder: "/home/coder", + workspace: "/home/coder/project.code-workspace", + }); + }; + expect(t).toThrow("Cannot specify both 'folder' and 'workspace'. Please use only one."); + }); + // More tests depend on shebang refactors -}); +}); \ No newline at end of file