aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/buffer.test.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-10-06 14:18:12 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-10-06 14:18:12 -0700
commit6970250b57918a9bc2199f40496dad59a5f622ce (patch)
treefed546b53cbfcb8baba30f49ada23297264a43d5 /test/bun.js/buffer.test.js
parentc880c53199f2c59f4444362e6ae1fa210733c48f (diff)
downloadbun-6970250b57918a9bc2199f40496dad59a5f622ce.tar.gz
bun-6970250b57918a9bc2199f40496dad59a5f622ce.tar.zst
bun-6970250b57918a9bc2199f40496dad59a5f622ce.zip
Fix Buffer.toJSON()
Diffstat (limited to '')
-rw-r--r--test/bun.js/buffer.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/bun.js/buffer.test.js b/test/bun.js/buffer.test.js
index c3f422024..02ee1e75e 100644
--- a/test/bun.js/buffer.test.js
+++ b/test/bun.js/buffer.test.js
@@ -4,6 +4,15 @@ import { gc } from "./gc";
beforeEach(() => gc());
afterEach(() => gc());
+it("Buffer.toJSON()", () => {
+ expect(JSON.stringify(Buffer.from("hello"))).toBe(
+ JSON.stringify({
+ type: "Buffer",
+ data: [104, 101, 108, 108, 111],
+ })
+ );
+});
+
it("buffer", () => {
var buf = new Buffer(20);
gc();
ry; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/.github/workflows/snapshot-release.yml (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-08-01feat: add logging for when hydrate's JSON parse fails (#7887)Gravatar Sam Hulick 2-3/+28
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-08-01Fix prefetch test fail (#7902)Gravatar Bjorn Lu 1-0/+2
2023-08-01[ci] formatGravatar bluwy 4-13/+28