mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
27 lines
931 B
JavaScript
27 lines
931 B
JavaScript
import { defineConfig } from "@vscode/test-cli";
|
|
import { dirname, join } from "node:path";
|
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
|
|
const workspacePath = dirname(import.meta.dirname);
|
|
const vscodePath = join(workspacePath, ".vscode-test");
|
|
const vscodeTestPath = join(vscodePath, "launch.test.js");
|
|
|
|
if(!existsSync(vscodeTestPath)) {
|
|
mkdirSync(vscodePath, { recursive: true });
|
|
writeFileSync(vscodeTestPath, `// Generated by ${import.meta.filename}
|
|
// A test that intentionally waits forever and does nothing,
|
|
// so you can debug and test the VSCode extension in a clean environment.
|
|
suite("VSCode extension", function () {
|
|
this.timeout(Number.MAX_SAFE_INTEGER);
|
|
test("wait forever", (done) => {});
|
|
});
|
|
`);
|
|
}
|
|
|
|
export default defineConfig({
|
|
workspaceFolder: join(workspacePath, "example"),
|
|
extensionDevelopmentPath: workspacePath,
|
|
skipExtensionDependencies: true,
|
|
files: vscodeTestPath,
|
|
});
|