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

8 lines
299 B
TypeScript

import { $ } from "bun";
import { expect, test } from "bun:test";
test("$ with Bun.file prints the path", async () => {
expect(await $`echo ${Bun.file(import.meta.path)}`.text()).toBe(`${import.meta.path}\n`);
expect(await $`echo ${import.meta.path}`.text()).toBe(`${import.meta.path}\n`);
});