aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-vscode/scripts/test.mjs
diff options
context:
space:
mode:
authorGravatar Ashcon Partovi <ashcon@partovi.net> 2023-08-26 02:34:25 -0700
committerGravatar GitHub <noreply@github.com> 2023-08-26 02:34:25 -0700
commit2a9e967fd1c766a718808d5a7fa779d74d44e62c (patch)
tree3bf4c059c03b9b561bc565ecf7cf21eaceae5353 /packages/bun-vscode/scripts/test.mjs
parent910daeff27ead119e15f35f6c1e0aa09d2aa7562 (diff)
downloadbun-2a9e967fd1c766a718808d5a7fa779d74d44e62c.tar.gz
bun-2a9e967fd1c766a718808d5a7fa779d74d44e62c.tar.zst
bun-2a9e967fd1c766a718808d5a7fa779d74d44e62c.zip
More improvements to debugger support (#4345)
* More fixes for dap * More changes * More changes 2 * More fixes * Fix debugger.ts * Bun Terminal
Diffstat (limited to 'packages/bun-vscode/scripts/test.mjs')
-rw-r--r--packages/bun-vscode/scripts/test.mjs21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/bun-vscode/scripts/test.mjs b/packages/bun-vscode/scripts/test.mjs
new file mode 100644
index 000000000..6e890c420
--- /dev/null
+++ b/packages/bun-vscode/scripts/test.mjs
@@ -0,0 +1,21 @@
+import { readdirSync } from "node:fs";
+import { spawn } from "node:child_process";
+
+const { pathname } = new URL("..", import.meta.url);
+process.chdir(pathname);
+
+let path;
+for (const filename of readdirSync("extension")) {
+ if (filename.endsWith(".vsix")) {
+ path = `extension/${filename}`;
+ break;
+ }
+}
+
+if (!path) {
+ throw new Error("No .vsix file found");
+}
+
+spawn("code", ["--new-window", `--install-extension=${path}`, `--extensionDevelopmentPath=${pathname}`, "example"], {
+ stdio: "inherit",
+});