Files
bun.sh/test/js/bun/shell/commands/which.test.ts
2024-09-03 21:32:52 -07:00

13 lines
383 B
TypeScript

import { $ } from "bun";
import { expect, test } from "bun:test";
test("which rlly long", async () => {
const longstr = "a".repeat(100000);
expect(async () => await $`${longstr}`.throws(true)).toThrow();
});
test("which PATH rlly long", async () => {
const longstr = "a".repeat(100000);
expect(async () => await $`PATH=${longstr} slkdfjlsdkfj`.throws(true)).toThrow();
});