mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
12 lines
383 B
TypeScript
12 lines
383 B
TypeScript
import { expect, it } from "bun:test";
|
|
import { tmpdir } from "node:os";
|
|
|
|
it("offset should work in Bun.file() #4963", async () => {
|
|
const filename = tmpdir() + "/bun.test.offset.txt";
|
|
await Bun.write(filename, "contents");
|
|
const file = Bun.file(filename);
|
|
const slice = file.slice(2, file.size);
|
|
const contents = await slice.text();
|
|
expect(contents).toBe("ntents");
|
|
});
|