mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 13:51:47 +00:00
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
43 lines
1.0 KiB
TypeScript
43 lines
1.0 KiB
TypeScript
import { tmpdirSync, bunEnv } from "harness";
|
|
import { bunExe } from "bun:harness";
|
|
import { expect, it } from "bun:test";
|
|
import * as path from "node:path";
|
|
|
|
it("successfully traverses pnpm-generated install directory", async () => {
|
|
const package_dir = tmpdirSync();
|
|
console.log(package_dir);
|
|
|
|
//
|
|
|
|
let { exited } = Bun.spawn({
|
|
cmd: [bunExe(), "create", "vite", "my-vite-app", "--template", "solid-ts"],
|
|
cwd: package_dir,
|
|
stdio: ["ignore", "inherit", "inherit"],
|
|
env: bunEnv,
|
|
});
|
|
expect(await exited).toBe(0);
|
|
console.log(1);
|
|
|
|
//
|
|
|
|
({ exited } = Bun.spawn({
|
|
cmd: ["pnpm", "install"],
|
|
cwd: path.join(package_dir, "my-vite-app"),
|
|
stdio: ["ignore", "inherit", "inherit"],
|
|
env: bunEnv,
|
|
}));
|
|
expect(await exited).toBe(0);
|
|
console.log(2);
|
|
|
|
//
|
|
|
|
({ exited } = Bun.spawn({
|
|
cmd: [bunExe(), "run", "build"],
|
|
cwd: path.join(package_dir, "my-vite-app"),
|
|
stdio: ["ignore", "inherit", "inherit"],
|
|
env: bunEnv,
|
|
}));
|
|
expect(await exited).toBe(0);
|
|
console.log(3);
|
|
}, 100_000);
|