aboutsummaryrefslogtreecommitdiff
path: root/test/js/bun/io/bun-write.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/bun/io/bun-write.test.js')
-rw-r--r--test/js/bun/io/bun-write.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/js/bun/io/bun-write.test.js b/test/js/bun/io/bun-write.test.js
index b67df9405..f435d2ceb 100644
--- a/test/js/bun/io/bun-write.test.js
+++ b/test/js/bun/io/bun-write.test.js
@@ -291,6 +291,15 @@ it.skip("Bun.write('output.html', HTMLRewriter.transform(Bun.file)))", async don
done();
});
+it("offset should work #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");
+});
+
it("#2674", async () => {
const file = path.join(import.meta.dir, "big-stdout.js");