mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
* Simplify string handling code * add extra + external * Update fs.test.ts * Bump * woopsie * prettier * Rename stats() to resourceUsage() * Fix leak * Fix more leaks * Setup malloc heap breakdown * Thread safety * Fix bug when creating buffer from utf-16 string cc @dylan-conway * Use global allocator * More new * Update fs.test.ts * Update setTimeout.test.js * Fix UAF in HTMLRewriter * More bun.new * Remove logs * Un-skip test which no longer is flaky * Even more `bun.new` * Fix memory leak in HTMLRewriter. Fixes #2325 * Don't accept Buffer for now * Fix issue with node-fetch polyfill * Don't destruct the response value too soon --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
21 lines
534 B
TypeScript
21 lines
534 B
TypeScript
import { describe, test, expect } from "bun:test";
|
|
import { spawnSync } from "bun";
|
|
import { bunEnv, bunExe } from "harness";
|
|
|
|
let cwd: string;
|
|
|
|
describe("bun", () => {
|
|
test("should error with missing script", () => {
|
|
const { exitCode, stdout, stderr } = spawnSync({
|
|
cwd,
|
|
cmd: [bunExe(), "run", "dev"],
|
|
env: bunEnv,
|
|
stdout: "pipe",
|
|
stderr: "pipe",
|
|
});
|
|
expect(stdout.toString()).toBeEmpty();
|
|
expect(stderr.toString()).toMatch(/Script not found/);
|
|
expect(exitCode).toBe(1);
|
|
});
|
|
});
|