diff options
Diffstat (limited to '')
-rw-r--r-- | test/bun.js/atob.test.js (renamed from integration/bunjs-only-snippets/atob.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/baz.js (renamed from integration/bunjs-only-snippets/baz.js) | 0 | ||||
-rw-r--r-- | test/bun.js/buffer.test.js | 304 | ||||
-rw-r--r-- | test/bun.js/bun-jsc.test.js (renamed from integration/bunjs-only-snippets/bun-jsc.test.js) | 4 | ||||
-rwxr-xr-x | test/bun.js/bun.lockb (renamed from integration/bunjs-only-snippets/bun.lockb) | bin | 109914 -> 109914 bytes | |||
l--------- | test/bun.js/bundled/always-bundled-module/always-bundled-module (renamed from integration/bunjs-only-snippets/bundled/always-bundled-module/always-bundled-module) | 0 | ||||
-rw-r--r-- | test/bun.js/bundled/always-bundled-module/cjs.js (renamed from integration/bunjs-only-snippets/bundled/always-bundled-module/cjs.js) | 0 | ||||
-rw-r--r-- | test/bun.js/bundled/always-bundled-module/esm.js (renamed from integration/bunjs-only-snippets/bundled/always-bundled-module/esm.js) | 0 | ||||
-rw-r--r-- | test/bun.js/bundled/always-bundled-module/package.json (renamed from integration/bunjs-only-snippets/bundled/always-bundled-module/package.json) | 0 | ||||
-rw-r--r-- | test/bun.js/bundled/entrypoint.ts (renamed from integration/bunjs-only-snippets/bundled/entrypoint.ts) | 0 | ||||
-rw-r--r-- | test/bun.js/bundled/package.json (renamed from integration/bunjs-only-snippets/bundled/package.json) | 0 | ||||
-rw-r--r-- | test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/cjs.js (renamed from integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/cjs.js) | 0 | ||||
-rw-r--r-- | test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/esm.js (renamed from integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/esm.js) | 0 | ||||
-rw-r--r-- | test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/package.json (renamed from integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/package.json) | 0 | ||||
-rw-r--r-- | test/bun.js/bundled/tsconfig.json (renamed from integration/bunjs-only-snippets/bundled/tsconfig.json) | 0 | ||||
-rw-r--r-- | test/bun.js/concat.test.js (renamed from integration/bunjs-only-snippets/concat.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/console-log.js (renamed from integration/bunjs-only-snippets/console-log.js) | 0 | ||||
-rw-r--r-- | test/bun.js/crypto.test.js (renamed from integration/bunjs-only-snippets/crypto.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/dirname.test.js (renamed from integration/bunjs-only-snippets/dirname.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/escapeHTML.test.js (renamed from integration/bunjs-only-snippets/escapeHTML.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/esm/first.mjs (renamed from integration/bunjs-only-snippets/esm/first.mjs) | 0 | ||||
-rw-r--r-- | test/bun.js/esm/second-child.mjs (renamed from integration/bunjs-only-snippets/esm/second-child.mjs) | 0 | ||||
-rw-r--r-- | test/bun.js/esm/second.mjs (renamed from integration/bunjs-only-snippets/esm/second.mjs) | 0 | ||||
-rw-r--r-- | test/bun.js/esm/startEnd.mjs (renamed from integration/bunjs-only-snippets/esm/startEnd.mjs) | 0 | ||||
-rw-r--r-- | test/bun.js/esm/third.mjs (renamed from integration/bunjs-only-snippets/esm/third.mjs) | 0 | ||||
-rw-r--r-- | test/bun.js/exit.js (renamed from integration/bunjs-only-snippets/exit.js) | 0 | ||||
-rw-r--r-- | test/bun.js/fetch.js.txt (renamed from integration/bunjs-only-snippets/fetch.js.txt) | 0 | ||||
-rw-r--r-- | test/bun.js/fetch.test.js (renamed from integration/bunjs-only-snippets/fetch.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/ffi-test.c (renamed from integration/bunjs-only-snippets/ffi-test.c) | 0 | ||||
-rw-r--r-- | test/bun.js/ffi.test.fixture.callback.c (renamed from integration/bunjs-only-snippets/ffi.test.fixture.callback.c) | 2 | ||||
-rw-r--r-- | test/bun.js/ffi.test.fixture.receiver.c (renamed from integration/bunjs-only-snippets/ffi.test.fixture.receiver.c) | 2 | ||||
-rw-r--r-- | test/bun.js/ffi.test.js | 543 | ||||
-rw-r--r-- | test/bun.js/fs-stream.js (renamed from integration/bunjs-only-snippets/fs-stream.js) | 0 | ||||
-rw-r--r-- | test/bun.js/fs.test.js (renamed from integration/bunjs-only-snippets/fs.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/gc.js (renamed from integration/bunjs-only-snippets/gc.js) | 0 | ||||
-rw-r--r-- | test/bun.js/globals.test.js (renamed from integration/bunjs-only-snippets/globals.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/hash.test.js (renamed from integration/bunjs-only-snippets/hash.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/html-rewriter.test.js (renamed from integration/bunjs-only-snippets/html-rewriter.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/import-meta.test.js (renamed from integration/bunjs-only-snippets/import-meta.test.js) | 6 | ||||
-rw-r--r-- | test/bun.js/inline.macro.js (renamed from integration/bunjs-only-snippets/inline.macro.js) | 0 | ||||
-rw-r--r-- | test/bun.js/inspect.test.js (renamed from integration/bunjs-only-snippets/inspect.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/macro-check.js (renamed from integration/bunjs-only-snippets/macro-check.js) | 0 | ||||
-rw-r--r-- | test/bun.js/microtask.test.js (renamed from integration/bunjs-only-snippets/microtask.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/mmap.test.js (renamed from integration/bunjs-only-snippets/mmap.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/node-builtins.test.js (renamed from integration/bunjs-only-snippets/node-builtins.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/path.test.js (renamed from integration/bunjs-only-snippets/path.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/performance.test.js (renamed from integration/bunjs-only-snippets/performance.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/process-nexttick.js (renamed from integration/bunjs-only-snippets/process-nexttick.js) | 0 | ||||
-rw-r--r-- | test/bun.js/process-nexttick.test.js (renamed from integration/bunjs-only-snippets/process-nexttick.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/process.test.js (renamed from integration/bunjs-only-snippets/process.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/readFileSync.txt (renamed from integration/bunjs-only-snippets/readFileSync.txt) | 0 | ||||
-rw-r--r-- | test/bun.js/readdir.js (renamed from integration/bunjs-only-snippets/readdir.js) | 0 | ||||
-rw-r--r-- | test/bun.js/reportError.test.js (renamed from integration/bunjs-only-snippets/reportError.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/require-json.json (renamed from integration/bunjs-only-snippets/require-json.json) | 0 | ||||
-rw-r--r-- | test/bun.js/resolve-typescript-file.tsx (renamed from integration/bunjs-only-snippets/resolve-typescript-file.tsx) | 0 | ||||
-rw-r--r-- | test/bun.js/resolve.test.js (renamed from integration/bunjs-only-snippets/resolve.test.js) | 2 | ||||
-rw-r--r-- | test/bun.js/response.file.test.js (renamed from integration/bunjs-only-snippets/response.file.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/serve.test.ts (renamed from integration/bunjs-only-snippets/serve.test.ts) | 0 | ||||
-rw-r--r-- | test/bun.js/setInterval.test.js (renamed from integration/bunjs-only-snippets/setInterval.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/setTimeout.test.js (renamed from integration/bunjs-only-snippets/setTimeout.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/shadow.test.js (renamed from integration/bunjs-only-snippets/shadow.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/sleep.js (renamed from integration/bunjs-only-snippets/sleep.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/SVG/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/SVG/output.bun.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/SVG/output.bun.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/SVG/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/SVG/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/attributeExpressions/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/attributeExpressions/output.bun.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/output.bun.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/attributeExpressions/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/components/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/components/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/components/output.bun.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/components/output.bun.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/components/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/components/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/conditionalExpressions/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/conditionalExpressions/output.bun.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/conditionalExpressions/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/customElements/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/customElements/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/customElements/output.bun.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/customElements/output.bun.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/customElements/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/customElements/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/eventExpressions/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/eventExpressions/output.bun.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/output.bun.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/eventExpressions/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/fragments/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/fragments/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/fragments/output.bun.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/fragments/output.bun.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/fragments/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/fragments/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/insertChildren/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/insertChildren/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/insertChildren/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/insertChildren/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/namespaceElements/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/namespaceElements/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/namespaceElements/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/namespaceElements/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/simpleElements/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/simpleElements/output.bun.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/output.bun.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/simpleElements/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/textInterpolation/code.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/code.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/textInterpolation/output.bun.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/output.bun.js) | 0 | ||||
-rw-r--r-- | test/bun.js/solid-dom-fixtures/textInterpolation/output.js (renamed from integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/output.js) | 0 | ||||
-rw-r--r-- | test/bun.js/some-fs.js (renamed from integration/bunjs-only-snippets/some-fs.js) | 0 | ||||
-rw-r--r-- | test/bun.js/sql-raw.test.js (renamed from integration/bunjs-only-snippets/sql-raw.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/sqlite.test.js (renamed from integration/bunjs-only-snippets/sqlite.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/streams.test.js (renamed from integration/bunjs-only-snippets/streams.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/text-encoder.test.js (renamed from integration/bunjs-only-snippets/text-encoder.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/toml-fixture.toml (renamed from integration/bunjs-only-snippets/toml-fixture.toml) | 0 | ||||
-rw-r--r-- | test/bun.js/toml.test.js (renamed from integration/bunjs-only-snippets/toml.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/transpiler.test.js (renamed from integration/bunjs-only-snippets/transpiler.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/tsconfig.json (renamed from integration/bunjs-only-snippets/tsconfig.json) | 0 | ||||
-rw-r--r-- | test/bun.js/unsafe.test.js (renamed from integration/bunjs-only-snippets/unsafe.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/url.test.ts (renamed from integration/bunjs-only-snippets/url.test.ts) | 0 | ||||
-rw-r--r-- | test/bun.js/wasm-return-1-test.zig (renamed from integration/bunjs-only-snippets/wasm-return-1-test.zig) | 0 | ||||
-rw-r--r-- | test/bun.js/wasm.js (renamed from integration/bunjs-only-snippets/wasm.js) | 0 | ||||
-rw-r--r-- | test/bun.js/wasm.test.js (renamed from integration/bunjs-only-snippets/wasm.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/web-globals.test.js (renamed from integration/bunjs-only-snippets/web-globals.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/websocket.test.js (renamed from integration/bunjs-only-snippets/websocket.test.js) | 0 | ||||
-rw-r--r-- | test/bun.js/writeFileSync.txt (renamed from integration/bunjs-only-snippets/writeFileSync.txt) | 0 | ||||
-rw-r--r-- | test/bun.js/zlib.test.js (renamed from integration/bunjs-only-snippets/zlib.test.js) | 0 |
111 files changed, 856 insertions, 7 deletions
diff --git a/integration/bunjs-only-snippets/atob.test.js b/test/bun.js/atob.test.js index 4945829e1..4945829e1 100644 --- a/integration/bunjs-only-snippets/atob.test.js +++ b/test/bun.js/atob.test.js diff --git a/integration/bunjs-only-snippets/baz.js b/test/bun.js/baz.js index 5837bb3bb..5837bb3bb 100644 --- a/integration/bunjs-only-snippets/baz.js +++ b/test/bun.js/baz.js diff --git a/test/bun.js/buffer.test.js b/test/bun.js/buffer.test.js new file mode 100644 index 000000000..6e9a3c6b4 --- /dev/null +++ b/test/bun.js/buffer.test.js @@ -0,0 +1,304 @@ +// import { describe, it, expect, beforeEach, afterEach } from "bun:test"; +// import { gc } from "./gc"; + +// beforeEach(() => gc()); +// afterEach(() => gc()); + +// it("buffer", () => { +// var buf = new Buffer(20); +// gc(); +// // if this fails or infinitely loops, it means there is a memory issue with the JSC::Structure object +// expect(Object.keys(buf).length > 0).toBe(true); +// gc(); +// expect(buf.write("hello world ")).toBe(12); +// expect(buf.write("hello world ", "utf8")).toBe(12); + +// gc(); +// expect(buf.toString("utf8", 0, "hello world ".length)).toBe("hello world "); +// gc(); +// expect(buf.toString("base64url", 0, "hello world ".length)).toBe( +// btoa("hello world ") +// ); +// gc(); +// expect(buf instanceof Uint8Array).toBe(true); +// gc(); +// expect(buf instanceof Buffer).toBe(true); +// gc(); +// expect(buf.slice() instanceof Uint8Array).toBe(true); +// gc(); +// expect(buf.slice(0, 1) instanceof Buffer).toBe(true); +// gc(); +// expect(buf.slice(0, 1) instanceof Uint8Array).toBe(true); +// gc(); +// expect(buf.slice(0, 1) instanceof Buffer).toBe(true); +// gc(); +// }); + +// it("Buffer", () => { +// var inputs = [ +// "hello world", +// "hello world".repeat(100), +// `😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌`, +// ]; +// var good = inputs.map((a) => new TextEncoder().encode(a)); +// for (let i = 0; i < inputs.length; i++) { +// var input = inputs[i]; +// expect(new Buffer(input).toString("utf8")).toBe(inputs[i]); +// gc(); +// expect(Array.from(new Buffer(input)).join(",")).toBe(good[i].join(",")); +// gc(); +// expect(Buffer.byteLength(input)).toBe(good[i].length); +// gc(); +// expect(Buffer.from(input).byteLength).toBe(Buffer.byteLength(input)); +// } +// }); + +// it("Buffer.byteLength", () => { +// expect(Buffer.byteLength("😀😃😄😁😆😅😂🤣☺️😊😊😇")).toBe( +// new TextEncoder().encode("😀😃😄😁😆😅😂🤣☺️😊😊😇").byteLength +// ); +// }); + +// it("Buffer.isBuffer", () => { +// expect(Buffer.isBuffer(new Buffer(1))).toBe(true); +// gc(); +// expect(Buffer.isBuffer(new Buffer(0))).toBe(true); +// gc(); +// expect(Buffer.isBuffer(new Uint8Array(0))).toBe(false); +// gc(); +// expect(Buffer.isBuffer(new Uint8Array(1))).toBe(false); +// gc(); +// var a = new Uint8Array(1); +// gc(); +// expect(Buffer.isBuffer(a)).toBe(false); +// gc(); +// Buffer.toBuffer(a); +// gc(); +// expect(Buffer.isBuffer(a)).toBe(true); +// gc(); +// }); + +// it("Buffer.toBuffer throws", () => { +// const checks = [ +// [], +// {}, +// "foo", +// new Uint16Array(), +// new DataView(new Uint8Array(14).buffer), +// ]; +// for (let i = 0; i < checks.length; i++) { +// try { +// Buffer.toBuffer(checks[i]); +// expect(false).toBe(true); +// } catch (exception) { +// expect(exception.message).toBe("Expected Uint8Array"); +// } +// } +// expect(true).toBe(true); +// }); + +// it("Buffer.toBuffer works", () => { +// var array = new Uint8Array(20); +// expect(array instanceof Buffer).toBe(false); +// var buf = Buffer.toBuffer(array); +// expect(array instanceof Buffer).toBe(true); +// // if this fails or infinitely loops, it means there is a memory issue with the JSC::Structure object +// expect(Object.keys(buf).length > 0).toBe(true); + +// expect(buf.write("hello world ")).toBe(12); +// gc(); +// expect(buf.toString("utf8", 0, "hello world ".length)).toBe("hello world "); +// gc(); +// expect(buf.toString("base64url", 0, "hello world ".length)).toBe( +// btoa("hello world ") +// ); +// gc(); + +// expect(buf instanceof Uint8Array).toBe(true); +// expect(buf instanceof Buffer).toBe(true); +// expect(buf.slice() instanceof Uint8Array).toBe(true); +// expect(buf.slice(0, 1) instanceof Buffer).toBe(true); +// expect(buf.slice(0, 1) instanceof Uint8Array).toBe(true); +// expect(buf.slice(0, 1) instanceof Buffer).toBe(true); +// expect(new Buffer(buf) instanceof Buffer).toBe(true); +// expect(new Buffer(buf.buffer) instanceof Buffer).toBe(true); +// }); + +// it("writeInt", () => { +// var buf = new Buffer(1024); +// var data = new DataView(buf.buffer); +// buf.writeInt32BE(100); +// expect(data.getInt32(0, false)).toBe(100); +// buf.writeInt32BE(100); +// expect(data.getInt32(0, false)).toBe(100); +// var childBuf = buf.subarray(0, 4); +// expect(data.getInt32(0, false)).toBe(100); +// expect(childBuf.readInt32BE(0, false)).toBe(100); +// }); + +// it("Buffer.from", () => { +// expect(Buffer.from("hello world").toString("utf8")).toBe("hello world"); +// expect(Buffer.from("hello world", "ascii").toString("utf8")).toBe( +// "hello world" +// ); +// expect(Buffer.from("hello world", "latin1").toString("utf8")).toBe( +// "hello world" +// ); +// gc(); +// expect(Buffer.from([254]).join(",")).toBe("254"); +// expect(Buffer.from(123).join(",")).toBe(Uint8Array.from(123).join(",")); +// expect(Buffer.from({ length: 124 }).join(",")).toBe( +// Uint8Array.from({ length: 124 }).join(",") +// ); + +// expect(Buffer.from(new ArrayBuffer(1024), 0, 512).join(",")).toBe( +// new Uint8Array(512).join(",") +// ); + +// expect(Buffer.from(new Buffer(new ArrayBuffer(1024), 0, 512)).join(",")).toBe( +// new Uint8Array(512).join(",") +// ); +// gc(); +// }); + +// it("Buffer.equals", () => { +// var a = new Uint8Array(10); +// a[2] = 1; +// var b = new Uint8Array(10); +// b[2] = 1; +// Buffer.toBuffer(a); +// Buffer.toBuffer(b); +// expect(a.equals(b)).toBe(true); +// b[2] = 0; +// expect(a.equals(b)).toBe(false); +// }); + +// it("Buffer.compare", () => { +// var a = new Uint8Array(10); +// a[2] = 1; +// var b = new Uint8Array(10); +// b[2] = 1; +// Buffer.toBuffer(a); +// Buffer.toBuffer(b); +// expect(a.compare(b)).toBe(0); +// b[2] = 0; +// expect(a.compare(b)).toBe(1); +// expect(b.compare(a)).toBe(-1); +// }); + +// it("Buffer.copy", () => { +// var array1 = new Uint8Array(128); +// array1.fill(100); +// Buffer.toBuffer(array1); +// var array2 = new Uint8Array(128); +// array2.fill(200); +// Buffer.toBuffer(array2); +// var array3 = new Uint8Array(128); +// Buffer.toBuffer(array3); +// gc(); +// expect(array1.copy(array2)).toBe(128); +// expect(array1.join("")).toBe(array2.join("")); +// }); + +// it("Buffer.concat", () => { +// var array1 = new Uint8Array(128); +// array1.fill(100); +// var array2 = new Uint8Array(128); +// array2.fill(200); +// var array3 = new Uint8Array(128); +// array3.fill(300); +// gc(); +// expect(Buffer.concat([array1, array2, array3]).join("")).toBe( +// array1.join("") + array2.join("") + array3.join("") +// ); +// expect(Buffer.concat([array1, array2, array3], 222).length).toBe(222); +// expect( +// Buffer.concat([array1, array2, array3], 222).subarray(0, 128).join("") +// ).toBe("100".repeat(128)); +// expect( +// Buffer.concat([array1, array2, array3], 222).subarray(129, 222).join("") +// ).toBe("200".repeat(222 - 129)); +// }); + +// it("read", () => { +// var buf = new Buffer(1024); +// var data = new DataView(buf.buffer); +// function reset() { +// new Uint8Array(buf.buffer).fill(0); +// } +// data.setBigInt64(0, BigInt(1000), false); +// expect(buf.readBigInt64BE(0)).toBe(BigInt(1000)); +// reset(); + +// data.setBigInt64(0, BigInt(1000), false); +// expect(buf.readBigInt64LE(0)).toBe(BigInt(1000)); +// reset(); + +// data.setBigUint64(0, BigInt(1000), false); +// expect(buf.readBigUInt64BE(0)).toBe(BigInt(1000)); +// reset(); + +// data.setBigUint64(0, BigInt(1000), false); +// expect(buf.readBigUInt64LE(0)).toBe(BigInt(1000)); +// reset(); + +// data.setFloat64(0, 1000, false); +// expect(buf.readDoubleBE(0)).toBe(1000); +// reset(); + +// data.setFloat64(0, 1000, true); +// expect(buf.readDoubleLE(0)).toBe(1000); +// reset(); + +// data.setFloat32(0, 1000, false); +// expect(buf.readFloatBE(0)).toBe(1000); +// reset(); + +// data.setFloat32(0, 1000, true); +// expect(buf.readFloatLE(0)).toBe(1000); +// reset(); + +// data.setInt16(0, 1000, false); +// expect(buf.readInt16BE(0)).toBe(1000); +// reset(); + +// data.setInt16(0, 1000, true); +// expect(buf.readInt16LE(0)).toBe(1000); +// reset(); + +// data.setInt32(0, 1000, false); +// expect(buf.readInt32BE(0)).toBe(1000); +// reset(); + +// data.setInt32(0, 1000, true); +// expect(buf.readInt32LE(0)).toBe(1000); +// reset(); + +// data.setInt8(0, 100, false); +// expect(buf.readInt8(0)).toBe(100); +// reset(); + +// data.setUint16(0, 1000, false); +// expect(buf.readUInt16BE(0)).toBe(1000); +// reset(); + +// data.setUint16(0, 1000, true); +// expect(buf.readUInt16LE(0)).toBe(1000); +// reset(); + +// data.setUint32(0, 1000, false); +// expect(buf.readUInt32BE(0)).toBe(1000); +// reset(); + +// data.setUint32(0, 1000, true); +// expect(buf.readUInt32LE(0)).toBe(1000); +// reset(); + +// data.setUint8(0, 255, false); +// expect(buf.readUInt8(0)).toBe(255); +// reset(); + +// data.setUint8(0, 255, false); +// expect(buf.readUInt8(0)).toBe(255); +// reset(); +// }); diff --git a/integration/bunjs-only-snippets/bun-jsc.test.js b/test/bun.js/bun-jsc.test.js index 975003b77..8ee0decf2 100644 --- a/integration/bunjs-only-snippets/bun-jsc.test.js +++ b/test/bun.js/bun-jsc.test.js @@ -20,6 +20,7 @@ import { totalCompileTime, reoptimizationRetryCount, drainMicrotasks, + startRemoteDebugger, } from "bun:jsc"; describe("bun:jsc", () => { @@ -91,4 +92,7 @@ describe("bun:jsc", () => { it("drainMicrotasks", () => { drainMicrotasks(); }); + it("startRemoteDebugger", () => { + startRemoteDebugger(""); + }); }); diff --git a/integration/bunjs-only-snippets/bun.lockb b/test/bun.js/bun.lockb Binary files differindex cff7a8ddc..cff7a8ddc 100755 --- a/integration/bunjs-only-snippets/bun.lockb +++ b/test/bun.js/bun.lockb diff --git a/integration/bunjs-only-snippets/bundled/always-bundled-module/always-bundled-module b/test/bun.js/bundled/always-bundled-module/always-bundled-module index f9a91ac4d..f9a91ac4d 120000 --- a/integration/bunjs-only-snippets/bundled/always-bundled-module/always-bundled-module +++ b/test/bun.js/bundled/always-bundled-module/always-bundled-module diff --git a/integration/bunjs-only-snippets/bundled/always-bundled-module/cjs.js b/test/bun.js/bundled/always-bundled-module/cjs.js index 087697589..087697589 100644 --- a/integration/bunjs-only-snippets/bundled/always-bundled-module/cjs.js +++ b/test/bun.js/bundled/always-bundled-module/cjs.js diff --git a/integration/bunjs-only-snippets/bundled/always-bundled-module/esm.js b/test/bun.js/bundled/always-bundled-module/esm.js index 28e702881..28e702881 100644 --- a/integration/bunjs-only-snippets/bundled/always-bundled-module/esm.js +++ b/test/bun.js/bundled/always-bundled-module/esm.js diff --git a/integration/bunjs-only-snippets/bundled/always-bundled-module/package.json b/test/bun.js/bundled/always-bundled-module/package.json index 5029c1695..5029c1695 100644 --- a/integration/bunjs-only-snippets/bundled/always-bundled-module/package.json +++ b/test/bun.js/bundled/always-bundled-module/package.json diff --git a/integration/bunjs-only-snippets/bundled/entrypoint.ts b/test/bun.js/bundled/entrypoint.ts index b9a17b538..b9a17b538 100644 --- a/integration/bunjs-only-snippets/bundled/entrypoint.ts +++ b/test/bun.js/bundled/entrypoint.ts diff --git a/integration/bunjs-only-snippets/bundled/package.json b/test/bun.js/bundled/package.json index cce72af9c..cce72af9c 100644 --- a/integration/bunjs-only-snippets/bundled/package.json +++ b/test/bun.js/bundled/package.json diff --git a/integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/cjs.js b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/cjs.js index 087697589..087697589 100644 --- a/integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/cjs.js +++ b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/cjs.js diff --git a/integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/esm.js b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/esm.js index 28e702881..28e702881 100644 --- a/integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/esm.js +++ b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/esm.js diff --git a/integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/package.json b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/package.json index 661a80b2d..661a80b2d 100644 --- a/integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/package.json +++ b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/package.json diff --git a/integration/bunjs-only-snippets/bundled/tsconfig.json b/test/bun.js/bundled/tsconfig.json index 358cb5526..358cb5526 100644 --- a/integration/bunjs-only-snippets/bundled/tsconfig.json +++ b/test/bun.js/bundled/tsconfig.json diff --git a/integration/bunjs-only-snippets/concat.test.js b/test/bun.js/concat.test.js index a965fdb94..a965fdb94 100644 --- a/integration/bunjs-only-snippets/concat.test.js +++ b/test/bun.js/concat.test.js diff --git a/integration/bunjs-only-snippets/console-log.js b/test/bun.js/console-log.js index e8aa200ac..e8aa200ac 100644 --- a/integration/bunjs-only-snippets/console-log.js +++ b/test/bun.js/console-log.js diff --git a/integration/bunjs-only-snippets/crypto.test.js b/test/bun.js/crypto.test.js index c489e11c1..c489e11c1 100644 --- a/integration/bunjs-only-snippets/crypto.test.js +++ b/test/bun.js/crypto.test.js diff --git a/integration/bunjs-only-snippets/dirname.test.js b/test/bun.js/dirname.test.js index 98292dc49..98292dc49 100644 --- a/integration/bunjs-only-snippets/dirname.test.js +++ b/test/bun.js/dirname.test.js diff --git a/integration/bunjs-only-snippets/escapeHTML.test.js b/test/bun.js/escapeHTML.test.js index ecfcc5e7c..ecfcc5e7c 100644 --- a/integration/bunjs-only-snippets/escapeHTML.test.js +++ b/test/bun.js/escapeHTML.test.js diff --git a/integration/bunjs-only-snippets/esm/first.mjs b/test/bun.js/esm/first.mjs index 17021c623..17021c623 100644 --- a/integration/bunjs-only-snippets/esm/first.mjs +++ b/test/bun.js/esm/first.mjs diff --git a/integration/bunjs-only-snippets/esm/second-child.mjs b/test/bun.js/esm/second-child.mjs index 5fb06ed45..5fb06ed45 100644 --- a/integration/bunjs-only-snippets/esm/second-child.mjs +++ b/test/bun.js/esm/second-child.mjs diff --git a/integration/bunjs-only-snippets/esm/second.mjs b/test/bun.js/esm/second.mjs index 888eb11b9..888eb11b9 100644 --- a/integration/bunjs-only-snippets/esm/second.mjs +++ b/test/bun.js/esm/second.mjs diff --git a/integration/bunjs-only-snippets/esm/startEnd.mjs b/test/bun.js/esm/startEnd.mjs index 8b5549802..8b5549802 100644 --- a/integration/bunjs-only-snippets/esm/startEnd.mjs +++ b/test/bun.js/esm/startEnd.mjs diff --git a/integration/bunjs-only-snippets/esm/third.mjs b/test/bun.js/esm/third.mjs index f5ba5cc84..f5ba5cc84 100644 --- a/integration/bunjs-only-snippets/esm/third.mjs +++ b/test/bun.js/esm/third.mjs diff --git a/integration/bunjs-only-snippets/exit.js b/test/bun.js/exit.js index fb28b1fb4..fb28b1fb4 100644 --- a/integration/bunjs-only-snippets/exit.js +++ b/test/bun.js/exit.js diff --git a/integration/bunjs-only-snippets/fetch.js.txt b/test/bun.js/fetch.js.txt index 5a9b52fcf..5a9b52fcf 100644 --- a/integration/bunjs-only-snippets/fetch.js.txt +++ b/test/bun.js/fetch.js.txt diff --git a/integration/bunjs-only-snippets/fetch.test.js b/test/bun.js/fetch.test.js index 9b6093afd..9b6093afd 100644 --- a/integration/bunjs-only-snippets/fetch.test.js +++ b/test/bun.js/fetch.test.js diff --git a/integration/bunjs-only-snippets/ffi-test.c b/test/bun.js/ffi-test.c index cc87d0528..cc87d0528 100644 --- a/integration/bunjs-only-snippets/ffi-test.c +++ b/test/bun.js/ffi-test.c diff --git a/integration/bunjs-only-snippets/ffi.test.fixture.callback.c b/test/bun.js/ffi.test.fixture.callback.c index 3a557e7d5..d48ef6753 100644 --- a/integration/bunjs-only-snippets/ffi.test.fixture.callback.c +++ b/test/bun.js/ffi.test.fixture.callback.c @@ -1,7 +1,7 @@ #define IS_CALLBACK 1 // This file is part of Bun! // You can find the original source: -// https://github.com/Jarred-Sumner/bun/blob/main/src/javascript/jsc/api/FFI.h#L2 +// https://github.com/Jarred-Sumner/bun/blob/main/src/bun.js/api/FFI.h#L2 // // clang-format off // This file is only compatible with 64 bit CPUs diff --git a/integration/bunjs-only-snippets/ffi.test.fixture.receiver.c b/test/bun.js/ffi.test.fixture.receiver.c index 8a75e12f9..5bb51bda5 100644 --- a/integration/bunjs-only-snippets/ffi.test.fixture.receiver.c +++ b/test/bun.js/ffi.test.fixture.receiver.c @@ -2,7 +2,7 @@ #define USES_FLOAT 1 // This file is part of Bun! // You can find the original source: -// https://github.com/Jarred-Sumner/bun/blob/main/src/javascript/jsc/api/FFI.h#L2 +// https://github.com/Jarred-Sumner/bun/blob/main/src/bun.js/api/FFI.h#L2 // // clang-format off // This file is only compatible with 64 bit CPUs diff --git a/test/bun.js/ffi.test.js b/test/bun.js/ffi.test.js new file mode 100644 index 000000000..db2cfb6d4 --- /dev/null +++ b/test/bun.js/ffi.test.js @@ -0,0 +1,543 @@ +// import { describe, it, expect } from "bun:test"; +// import { unsafe } from "bun"; +// // +// import { +// native, +// viewSource, +// dlopen, +// CString, +// ptr, +// toBuffer, +// toArrayBuffer, +// FFIType, +// callback, +// CFunction, +// } from "bun:ffi"; + +// it("ffi print", async () => { +// await Bun.write( +// import.meta.dir + "/ffi.test.fixture.callback.c", +// viewSource( +// { +// returns: "bool", +// args: ["ptr"], +// }, +// true +// ) +// ); +// await Bun.write( +// import.meta.dir + "/ffi.test.fixture.receiver.c", +// viewSource( +// { +// not_a_callback: { +// returns: "float", +// args: ["float"], +// }, +// }, +// false +// )[0] +// ); +// expect( +// viewSource( +// { +// returns: "int8_t", +// args: [], +// }, +// true +// ).length > 0 +// ).toBe(true); +// expect( +// viewSource( +// { +// a: { +// returns: "int8_t", +// args: [], +// }, +// }, +// false +// ).length > 0 +// ).toBe(true); +// }); + +// function getTypes(fast) { +// const int64_t = fast ? "i64_fast" : "int64_t"; +// const uint64_t = fast ? "u64_fast" : "uint64_t"; +// return { +// returns_true: { +// returns: "bool", +// args: [], +// }, +// returns_false: { +// returns: "bool", +// args: [], +// }, +// returns_42_char: { +// returns: "char", +// args: [], +// }, +// returns_42_float: { +// returns: "float", +// args: [], +// }, +// returns_42_double: { +// returns: "double", +// args: [], +// }, +// returns_42_uint8_t: { +// returns: "uint8_t", +// args: [], +// }, +// returns_neg_42_int8_t: { +// returns: "int8_t", +// args: [], +// }, +// returns_42_uint16_t: { +// returns: "uint16_t", +// args: [], +// }, +// returns_42_uint32_t: { +// returns: "uint32_t", +// args: [], +// }, +// returns_42_uint64_t: { +// returns: uint64_t, +// args: [], +// }, +// returns_neg_42_int16_t: { +// returns: "int16_t", +// args: [], +// }, +// returns_neg_42_int32_t: { +// returns: "int32_t", +// args: [], +// }, +// returns_neg_42_int64_t: { +// returns: int64_t, +// args: [], +// }, + +// identity_char: { +// returns: "char", +// args: ["char"], +// }, +// identity_float: { +// returns: "float", +// args: ["float"], +// }, +// identity_bool: { +// returns: "bool", +// args: ["bool"], +// }, +// identity_double: { +// returns: "double", +// args: ["double"], +// }, +// identity_int8_t: { +// returns: "int8_t", +// args: ["int8_t"], +// }, +// identity_int16_t: { +// returns: "int16_t", +// args: ["int16_t"], +// }, +// identity_int32_t: { +// returns: "int32_t", +// args: ["int32_t"], +// }, +// identity_int64_t: { +// returns: int64_t, +// args: [int64_t], +// }, +// identity_uint8_t: { +// returns: "uint8_t", +// args: ["uint8_t"], +// }, +// identity_uint16_t: { +// returns: "uint16_t", +// args: ["uint16_t"], +// }, +// identity_uint32_t: { +// returns: "uint32_t", +// args: ["uint32_t"], +// }, +// identity_uint64_t: { +// returns: uint64_t, +// args: [uint64_t], +// }, + +// add_char: { +// returns: "char", +// args: ["char", "char"], +// }, +// add_float: { +// returns: "float", +// args: ["float", "float"], +// }, +// add_double: { +// returns: "double", +// args: ["double", "double"], +// }, +// add_int8_t: { +// returns: "int8_t", +// args: ["int8_t", "int8_t"], +// }, +// add_int16_t: { +// returns: "int16_t", +// args: ["int16_t", "int16_t"], +// }, +// add_int32_t: { +// returns: "int32_t", +// args: ["int32_t", "int32_t"], +// }, +// add_int64_t: { +// returns: int64_t, +// args: [int64_t, int64_t], +// }, +// add_uint8_t: { +// returns: "uint8_t", +// args: ["uint8_t", "uint8_t"], +// }, +// add_uint16_t: { +// returns: "uint16_t", +// args: ["uint16_t", "uint16_t"], +// }, +// add_uint32_t: { +// returns: "uint32_t", +// args: ["uint32_t", "uint32_t"], +// }, + +// does_pointer_equal_42_as_int32_t: { +// returns: "bool", +// args: ["ptr"], +// }, + +// ptr_should_point_to_42_as_int32_t: { +// returns: "ptr", +// args: [], +// }, +// identity_ptr: { +// returns: "ptr", +// args: ["ptr"], +// }, +// add_uint64_t: { +// returns: uint64_t, +// args: [uint64_t, uint64_t], +// }, + +// cb_identity_true: { +// returns: "bool", +// args: ["ptr"], +// }, +// cb_identity_false: { +// returns: "bool", +// args: ["ptr"], +// }, +// cb_identity_42_char: { +// returns: "char", +// args: ["ptr"], +// }, +// cb_identity_42_float: { +// returns: "float", +// args: ["ptr"], +// }, +// cb_identity_42_double: { +// returns: "double", +// args: ["ptr"], +// }, +// cb_identity_42_uint8_t: { +// returns: "uint8_t", +// args: ["ptr"], +// }, +// cb_identity_neg_42_int8_t: { +// returns: "int8_t", +// args: ["ptr"], +// }, +// cb_identity_42_uint16_t: { +// returns: "uint16_t", +// args: ["ptr"], +// }, +// cb_identity_42_uint32_t: { +// returns: "uint32_t", +// args: ["ptr"], +// }, +// cb_identity_42_uint64_t: { +// returns: uint64_t, +// args: ["ptr"], +// }, +// cb_identity_neg_42_int16_t: { +// returns: "int16_t", +// args: ["ptr"], +// }, +// cb_identity_neg_42_int32_t: { +// returns: "int32_t", +// args: ["ptr"], +// }, +// cb_identity_neg_42_int64_t: { +// returns: int64_t, +// args: ["ptr"], +// }, + +// return_a_function_ptr_to_function_that_returns_true: { +// returns: "ptr", +// args: [], +// }, +// }; +// } + +// function ffiRunner(types) { +// const { +// symbols: { +// returns_true, +// returns_false, +// return_a_function_ptr_to_function_that_returns_true, +// returns_42_char, +// returns_42_float, +// returns_42_double, +// returns_42_uint8_t, +// returns_neg_42_int8_t, +// returns_42_uint16_t, +// returns_42_uint32_t, +// returns_42_uint64_t, +// returns_neg_42_int16_t, +// returns_neg_42_int32_t, +// returns_neg_42_int64_t, +// identity_char, +// identity_float, +// identity_bool, +// identity_double, +// identity_int8_t, +// identity_int16_t, +// identity_int32_t, +// identity_int64_t, +// identity_uint8_t, +// identity_uint16_t, +// identity_uint32_t, +// identity_uint64_t, +// add_char, +// add_float, +// add_double, +// add_int8_t, +// add_int16_t, +// add_int32_t, +// add_int64_t, +// add_uint8_t, +// add_uint16_t, +// identity_ptr, +// add_uint32_t, +// add_uint64_t, +// does_pointer_equal_42_as_int32_t, +// ptr_should_point_to_42_as_int32_t, +// cb_identity_true, +// cb_identity_false, +// cb_identity_42_char, +// cb_identity_42_float, +// cb_identity_42_double, +// cb_identity_42_uint8_t, +// cb_identity_neg_42_int8_t, +// cb_identity_42_uint16_t, +// cb_identity_42_uint32_t, +// cb_identity_42_uint64_t, +// cb_identity_neg_42_int16_t, +// cb_identity_neg_42_int32_t, +// cb_identity_neg_42_int64_t, +// }, +// close, +// } = dlopen("/tmp/bun-ffi-test.dylib", types); + +// expect(returns_true()).toBe(true); + +// expect(returns_false()).toBe(false); + +// expect(returns_42_char()).toBe(42); +// console.log( +// returns_42_uint64_t().valueOf(), +// returns_42_uint64_t(), +// returns_42_uint64_t().valueOf() === returns_42_uint64_t() +// ); +// expect(returns_42_uint64_t().valueOf()).toBe(42); + +// expect(Math.fround(returns_42_float())).toBe(Math.fround(42.41999804973602)); +// expect(returns_42_double()).toBe(42.42); +// expect(returns_42_uint8_t()).toBe(42); +// expect(returns_neg_42_int8_t()).toBe(-42); +// expect(returns_42_uint16_t()).toBe(42); +// expect(returns_42_uint32_t()).toBe(42); +// expect(returns_42_uint64_t()).toBe(42); +// expect(returns_neg_42_int16_t()).toBe(-42); +// expect(returns_neg_42_int32_t()).toBe(-42); +// expect(identity_int32_t(10)).toBe(10); +// expect(returns_neg_42_int64_t()).toBe(-42); + +// expect(identity_char(10)).toBe(10); + +// expect(identity_float(10.199999809265137)).toBe(10.199999809265137); + +// expect(identity_bool(true)).toBe(true); + +// expect(identity_bool(false)).toBe(false); +// expect(identity_double(10.100000000000364)).toBe(10.100000000000364); + +// expect(identity_int8_t(10)).toBe(10); +// expect(identity_int16_t(10)).toBe(10); +// expect(identity_int64_t(10)).toBe(10); +// expect(identity_uint8_t(10)).toBe(10); +// expect(identity_uint16_t(10)).toBe(10); +// expect(identity_uint32_t(10)).toBe(10); +// expect(identity_uint64_t(10)).toBe(10); + +// var bigArray = new BigUint64Array(8); +// new Uint8Array(bigArray.buffer).fill(255); +// var bigIntArray = new BigInt64Array(bigArray.buffer); +// expect(identity_uint64_t(bigArray[0])).toBe(bigArray[0]); +// expect(identity_uint64_t(bigArray[0] - BigInt(1))).toBe( +// bigArray[0] - BigInt(1) +// ); + +// expect(add_uint64_t(BigInt(-1) * bigArray[0], bigArray[0])).toBe(0); +// expect(add_uint64_t(BigInt(-1) * bigArray[0] + BigInt(10), bigArray[0])).toBe( +// 10 +// ); +// expect(identity_uint64_t(0)).toBe(0); +// expect(identity_uint64_t(100)).toBe(100); +// expect(identity_uint64_t(BigInt(100))).toBe(100); +// expect(identity_int64_t(bigIntArray[0])).toBe(bigIntArray[0]); +// expect(identity_int64_t(bigIntArray[0] - BigInt(1))).toBe( +// bigIntArray[0] - BigInt(1) +// ); + +// expect(add_char(1, 1)).toBe(2); +// expect(add_float(2.4, 2.8)).toBe(Math.fround(5.2)); +// expect(add_double(4.2, 0.1)).toBe(4.3); +// expect(add_int8_t(1, 1)).toBe(2); +// expect(add_int16_t(1, 1)).toBe(2); +// expect(add_int32_t(1, 1)).toBe(2); +// expect(add_int64_t(1, 1)).toBe(2); +// expect(add_uint8_t(1, 1)).toBe(2); +// expect(add_uint16_t(1, 1)).toBe(2); +// expect(add_uint32_t(1, 1)).toBe(2); + +// const cptr = ptr_should_point_to_42_as_int32_t(); +// expect(cptr != 0).toBe(true); +// expect(typeof cptr === "number").toBe(true); +// expect(does_pointer_equal_42_as_int32_t(cptr)).toBe(true); +// const buffer = toBuffer(cptr, 0, 4); +// expect(buffer.readInt32(0)).toBe(42); +// expect(new DataView(toArrayBuffer(cptr, 0, 4), 0, 4).getInt32(0, true)).toBe( +// 42 +// ); +// expect(ptr(buffer)).toBe(cptr); +// expect(new CString(cptr, 0, 1).toString()).toBe("*"); +// expect(identity_ptr(cptr)).toBe(cptr); +// const second_ptr = ptr(new Buffer(8)); +// expect(identity_ptr(second_ptr)).toBe(second_ptr); + +// var myCFunction = new CFunction({ +// ptr: return_a_function_ptr_to_function_that_returns_true(), +// returns: "bool", +// }); +// expect(myCFunction()).toBe(true); + +// // function identityBool() { +// // return true; +// // } +// // globalThis.identityBool = identityBool; + +// // const first = native.callback( +// // { +// // returns: "bool", +// // }, +// // identityBool +// // ); +// // expect( +// // cb_identity_true() +// // ).toBe(true); + +// // expect(cb_identity_true(first)).toBe(true); + +// // expect( +// // cb_identity_false( +// // callback( +// // { +// // returns: "bool", +// // }, +// // () => false +// // ) +// // ) +// // ).toBe(false); + +// // expect( +// // cb_identity_42_char( +// // callback( +// // { +// // returns: "char", +// // }, +// // () => 42 +// // ) +// // ) +// // ).toBe(42); +// // expect( +// // cb_identity_42_uint8_t( +// // callback( +// // { +// // returns: "uint8_t", +// // }, +// // () => 42 +// // ) +// // ) +// // ).toBe(42); + +// // cb_identity_neg_42_int8_t( +// // callback( +// // { +// // returns: "int8_t", +// // }, +// // () => -42 +// // ) +// // ).toBe(-42); + +// // cb_identity_42_uint16_t( +// // callback( +// // { +// // returns: "uint16_t", +// // }, +// // () => 42 +// // ) +// // ).toBe(42); + +// // cb_identity_42_uint32_t( +// // callback( +// // { +// // returns: "uint32_t", +// // }, +// // () => 42 +// // ) +// // ).toBe(42); + +// // cb_identity_neg_42_int16_t( +// // callback( +// // { +// // returns: "int16_t", +// // }, +// // () => -42 +// // ) +// // ).toBe(-42); + +// // cb_identity_neg_42_int32_t( +// // callback( +// // { +// // returns: "int32_t", +// // }, +// // () => -42 +// // ) +// // ).toBe(-42); + +// close(); +// } + +// it("run ffi fast", () => { +// ffiRunner(getTypes(true)); +// }); + +// it("run ffi", () => { +// ffiRunner(getTypes(false)); +// }); diff --git a/integration/bunjs-only-snippets/fs-stream.js b/test/bun.js/fs-stream.js index 4b71c95b7..4b71c95b7 100644 --- a/integration/bunjs-only-snippets/fs-stream.js +++ b/test/bun.js/fs-stream.js diff --git a/integration/bunjs-only-snippets/fs.test.js b/test/bun.js/fs.test.js index 79ac60eaa..79ac60eaa 100644 --- a/integration/bunjs-only-snippets/fs.test.js +++ b/test/bun.js/fs.test.js diff --git a/integration/bunjs-only-snippets/gc.js b/test/bun.js/gc.js index 9212e8b76..9212e8b76 100644 --- a/integration/bunjs-only-snippets/gc.js +++ b/test/bun.js/gc.js diff --git a/integration/bunjs-only-snippets/globals.test.js b/test/bun.js/globals.test.js index b498e0e8e..b498e0e8e 100644 --- a/integration/bunjs-only-snippets/globals.test.js +++ b/test/bun.js/globals.test.js diff --git a/integration/bunjs-only-snippets/hash.test.js b/test/bun.js/hash.test.js index 71ad5a229..71ad5a229 100644 --- a/integration/bunjs-only-snippets/hash.test.js +++ b/test/bun.js/hash.test.js diff --git a/integration/bunjs-only-snippets/html-rewriter.test.js b/test/bun.js/html-rewriter.test.js index 29b765c2f..29b765c2f 100644 --- a/integration/bunjs-only-snippets/html-rewriter.test.js +++ b/test/bun.js/html-rewriter.test.js diff --git a/integration/bunjs-only-snippets/import-meta.test.js b/test/bun.js/import-meta.test.js index 0520be3a5..0e2faa903 100644 --- a/integration/bunjs-only-snippets/import-meta.test.js +++ b/test/bun.js/import-meta.test.js @@ -25,11 +25,9 @@ it("import.meta.require", () => { }); it("import.meta.dir", () => { - expect(dir.endsWith("/bun/integration/bunjs-only-snippets")).toBe(true); + expect(dir.endsWith("/bun/test/bun.js")).toBe(true); }); it("import.meta.path", () => { - expect( - path.endsWith("/bun/integration/bunjs-only-snippets/import-meta.test.js") - ).toBe(true); + expect(path.endsWith("/bun/test/bun.js/import-meta.test.js")).toBe(true); }); diff --git a/integration/bunjs-only-snippets/inline.macro.js b/test/bun.js/inline.macro.js index ff0292d0a..ff0292d0a 100644 --- a/integration/bunjs-only-snippets/inline.macro.js +++ b/test/bun.js/inline.macro.js diff --git a/integration/bunjs-only-snippets/inspect.test.js b/test/bun.js/inspect.test.js index bf5021c33..bf5021c33 100644 --- a/integration/bunjs-only-snippets/inspect.test.js +++ b/test/bun.js/inspect.test.js diff --git a/integration/bunjs-only-snippets/macro-check.js b/test/bun.js/macro-check.js index 0f494a4e7..0f494a4e7 100644 --- a/integration/bunjs-only-snippets/macro-check.js +++ b/test/bun.js/macro-check.js diff --git a/integration/bunjs-only-snippets/microtask.test.js b/test/bun.js/microtask.test.js index 18956b1e5..18956b1e5 100644 --- a/integration/bunjs-only-snippets/microtask.test.js +++ b/test/bun.js/microtask.test.js diff --git a/integration/bunjs-only-snippets/mmap.test.js b/test/bun.js/mmap.test.js index 2b15a4000..2b15a4000 100644 --- a/integration/bunjs-only-snippets/mmap.test.js +++ b/test/bun.js/mmap.test.js diff --git a/integration/bunjs-only-snippets/node-builtins.test.js b/test/bun.js/node-builtins.test.js index df31c64fc..df31c64fc 100644 --- a/integration/bunjs-only-snippets/node-builtins.test.js +++ b/test/bun.js/node-builtins.test.js diff --git a/integration/bunjs-only-snippets/path.test.js b/test/bun.js/path.test.js index 997368150..997368150 100644 --- a/integration/bunjs-only-snippets/path.test.js +++ b/test/bun.js/path.test.js diff --git a/integration/bunjs-only-snippets/performance.test.js b/test/bun.js/performance.test.js index 5e8520638..5e8520638 100644 --- a/integration/bunjs-only-snippets/performance.test.js +++ b/test/bun.js/performance.test.js diff --git a/integration/bunjs-only-snippets/process-nexttick.js b/test/bun.js/process-nexttick.js index 337977c0a..337977c0a 100644 --- a/integration/bunjs-only-snippets/process-nexttick.js +++ b/test/bun.js/process-nexttick.js diff --git a/integration/bunjs-only-snippets/process-nexttick.test.js b/test/bun.js/process-nexttick.test.js index ac53399c0..ac53399c0 100644 --- a/integration/bunjs-only-snippets/process-nexttick.test.js +++ b/test/bun.js/process-nexttick.test.js diff --git a/integration/bunjs-only-snippets/process.test.js b/test/bun.js/process.test.js index f82834a04..f82834a04 100644 --- a/integration/bunjs-only-snippets/process.test.js +++ b/test/bun.js/process.test.js diff --git a/integration/bunjs-only-snippets/readFileSync.txt b/test/bun.js/readFileSync.txt index ddc94b988..ddc94b988 100644 --- a/integration/bunjs-only-snippets/readFileSync.txt +++ b/test/bun.js/readFileSync.txt diff --git a/integration/bunjs-only-snippets/readdir.js b/test/bun.js/readdir.js index 18c111d0a..18c111d0a 100644 --- a/integration/bunjs-only-snippets/readdir.js +++ b/test/bun.js/readdir.js diff --git a/integration/bunjs-only-snippets/reportError.test.js b/test/bun.js/reportError.test.js index e51f93309..e51f93309 100644 --- a/integration/bunjs-only-snippets/reportError.test.js +++ b/test/bun.js/reportError.test.js diff --git a/integration/bunjs-only-snippets/require-json.json b/test/bun.js/require-json.json index 6414edc0e..6414edc0e 100644 --- a/integration/bunjs-only-snippets/require-json.json +++ b/test/bun.js/require-json.json diff --git a/integration/bunjs-only-snippets/resolve-typescript-file.tsx b/test/bun.js/resolve-typescript-file.tsx index ff8b4c563..ff8b4c563 100644 --- a/integration/bunjs-only-snippets/resolve-typescript-file.tsx +++ b/test/bun.js/resolve-typescript-file.tsx diff --git a/integration/bunjs-only-snippets/resolve.test.js b/test/bun.js/resolve.test.js index f86d31980..56162de4f 100644 --- a/integration/bunjs-only-snippets/resolve.test.js +++ b/test/bun.js/resolve.test.js @@ -12,7 +12,7 @@ it("import.meta.resolve", async () => { expect( // optional second param can be any path, including a dir await import.meta.resolve( - "./bunjs-only-snippets/resolve.test.js", + "./bun.js/resolve.test.js", join(import.meta.path, "../") ) ).toBe(import.meta.path); diff --git a/integration/bunjs-only-snippets/response.file.test.js b/test/bun.js/response.file.test.js index 2d0b6506e..2d0b6506e 100644 --- a/integration/bunjs-only-snippets/response.file.test.js +++ b/test/bun.js/response.file.test.js diff --git a/integration/bunjs-only-snippets/serve.test.ts b/test/bun.js/serve.test.ts index 8b785dd25..8b785dd25 100644 --- a/integration/bunjs-only-snippets/serve.test.ts +++ b/test/bun.js/serve.test.ts diff --git a/integration/bunjs-only-snippets/setInterval.test.js b/test/bun.js/setInterval.test.js index f633998cd..f633998cd 100644 --- a/integration/bunjs-only-snippets/setInterval.test.js +++ b/test/bun.js/setInterval.test.js diff --git a/integration/bunjs-only-snippets/setTimeout.test.js b/test/bun.js/setTimeout.test.js index 55f71712c..55f71712c 100644 --- a/integration/bunjs-only-snippets/setTimeout.test.js +++ b/test/bun.js/setTimeout.test.js diff --git a/integration/bunjs-only-snippets/shadow.test.js b/test/bun.js/shadow.test.js index 3fffcac90..3fffcac90 100644 --- a/integration/bunjs-only-snippets/shadow.test.js +++ b/test/bun.js/shadow.test.js diff --git a/integration/bunjs-only-snippets/sleep.js b/test/bun.js/sleep.js index 080597424..080597424 100644 --- a/integration/bunjs-only-snippets/sleep.js +++ b/test/bun.js/sleep.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js b/test/bun.js/solid-dom-fixtures/SVG/code.js index 0ffded054..0ffded054 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js +++ b/test/bun.js/solid-dom-fixtures/SVG/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/output.bun.js b/test/bun.js/solid-dom-fixtures/SVG/output.bun.js index 44d092f15..44d092f15 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/output.bun.js +++ b/test/bun.js/solid-dom-fixtures/SVG/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/output.js b/test/bun.js/solid-dom-fixtures/SVG/output.js index edac460af..edac460af 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/output.js +++ b/test/bun.js/solid-dom-fixtures/SVG/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/code.js b/test/bun.js/solid-dom-fixtures/attributeExpressions/code.js index b64949434..b64949434 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/code.js +++ b/test/bun.js/solid-dom-fixtures/attributeExpressions/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/output.bun.js b/test/bun.js/solid-dom-fixtures/attributeExpressions/output.bun.js index 4bb3e1b39..4bb3e1b39 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/output.bun.js +++ b/test/bun.js/solid-dom-fixtures/attributeExpressions/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/output.js b/test/bun.js/solid-dom-fixtures/attributeExpressions/output.js index 14f700218..14f700218 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/output.js +++ b/test/bun.js/solid-dom-fixtures/attributeExpressions/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/components/code.js b/test/bun.js/solid-dom-fixtures/components/code.js index f3bd159d6..f3bd159d6 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/components/code.js +++ b/test/bun.js/solid-dom-fixtures/components/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/components/output.bun.js b/test/bun.js/solid-dom-fixtures/components/output.bun.js index 5ab4d5614..5ab4d5614 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/components/output.bun.js +++ b/test/bun.js/solid-dom-fixtures/components/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/components/output.js b/test/bun.js/solid-dom-fixtures/components/output.js index 0c49d60a3..0c49d60a3 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/components/output.js +++ b/test/bun.js/solid-dom-fixtures/components/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/code.js b/test/bun.js/solid-dom-fixtures/conditionalExpressions/code.js index 80f1a6a4f..80f1a6a4f 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/code.js +++ b/test/bun.js/solid-dom-fixtures/conditionalExpressions/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js b/test/bun.js/solid-dom-fixtures/conditionalExpressions/output.bun.js index 36c3f649b..36c3f649b 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js +++ b/test/bun.js/solid-dom-fixtures/conditionalExpressions/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.js b/test/bun.js/solid-dom-fixtures/conditionalExpressions/output.js index 1511f4222..1511f4222 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.js +++ b/test/bun.js/solid-dom-fixtures/conditionalExpressions/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/customElements/code.js b/test/bun.js/solid-dom-fixtures/customElements/code.js index f2e2bd02d..f2e2bd02d 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/customElements/code.js +++ b/test/bun.js/solid-dom-fixtures/customElements/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/customElements/output.bun.js b/test/bun.js/solid-dom-fixtures/customElements/output.bun.js index 79c46280c..79c46280c 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/customElements/output.bun.js +++ b/test/bun.js/solid-dom-fixtures/customElements/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/customElements/output.js b/test/bun.js/solid-dom-fixtures/customElements/output.js index 79274ce2c..79274ce2c 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/customElements/output.js +++ b/test/bun.js/solid-dom-fixtures/customElements/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js b/test/bun.js/solid-dom-fixtures/eventExpressions/code.js index 78bc5e199..78bc5e199 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js +++ b/test/bun.js/solid-dom-fixtures/eventExpressions/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/output.bun.js b/test/bun.js/solid-dom-fixtures/eventExpressions/output.bun.js index 5d90654f9..5d90654f9 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/output.bun.js +++ b/test/bun.js/solid-dom-fixtures/eventExpressions/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/output.js b/test/bun.js/solid-dom-fixtures/eventExpressions/output.js index c24a1f89f..c24a1f89f 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/output.js +++ b/test/bun.js/solid-dom-fixtures/eventExpressions/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/fragments/code.js b/test/bun.js/solid-dom-fixtures/fragments/code.js index 0b6021e44..0b6021e44 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/fragments/code.js +++ b/test/bun.js/solid-dom-fixtures/fragments/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/fragments/output.bun.js b/test/bun.js/solid-dom-fixtures/fragments/output.bun.js index 54d980cee..54d980cee 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/fragments/output.bun.js +++ b/test/bun.js/solid-dom-fixtures/fragments/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/fragments/output.js b/test/bun.js/solid-dom-fixtures/fragments/output.js index 5fe0c767c..5fe0c767c 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/fragments/output.js +++ b/test/bun.js/solid-dom-fixtures/fragments/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/insertChildren/code.js b/test/bun.js/solid-dom-fixtures/insertChildren/code.js index 41d3d017e..41d3d017e 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/insertChildren/code.js +++ b/test/bun.js/solid-dom-fixtures/insertChildren/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/insertChildren/output.js b/test/bun.js/solid-dom-fixtures/insertChildren/output.js index 9ad937742..9ad937742 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/insertChildren/output.js +++ b/test/bun.js/solid-dom-fixtures/insertChildren/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/namespaceElements/code.js b/test/bun.js/solid-dom-fixtures/namespaceElements/code.js index 7ad410329..7ad410329 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/namespaceElements/code.js +++ b/test/bun.js/solid-dom-fixtures/namespaceElements/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/namespaceElements/output.js b/test/bun.js/solid-dom-fixtures/namespaceElements/output.js index 162ffb140..162ffb140 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/namespaceElements/output.js +++ b/test/bun.js/solid-dom-fixtures/namespaceElements/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/code.js b/test/bun.js/solid-dom-fixtures/simpleElements/code.js index c3537ee7d..c3537ee7d 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/code.js +++ b/test/bun.js/solid-dom-fixtures/simpleElements/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/output.bun.js b/test/bun.js/solid-dom-fixtures/simpleElements/output.bun.js index 72d61c1e3..72d61c1e3 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/output.bun.js +++ b/test/bun.js/solid-dom-fixtures/simpleElements/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/output.js b/test/bun.js/solid-dom-fixtures/simpleElements/output.js index 5d16f6767..5d16f6767 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/output.js +++ b/test/bun.js/solid-dom-fixtures/simpleElements/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/code.js b/test/bun.js/solid-dom-fixtures/textInterpolation/code.js index 21698ea89..21698ea89 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/code.js +++ b/test/bun.js/solid-dom-fixtures/textInterpolation/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/output.bun.js b/test/bun.js/solid-dom-fixtures/textInterpolation/output.bun.js index eb4c5347a..eb4c5347a 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/output.bun.js +++ b/test/bun.js/solid-dom-fixtures/textInterpolation/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/output.js b/test/bun.js/solid-dom-fixtures/textInterpolation/output.js index b86a631fb..b86a631fb 100644 --- a/integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/output.js +++ b/test/bun.js/solid-dom-fixtures/textInterpolation/output.js diff --git a/integration/bunjs-only-snippets/some-fs.js b/test/bun.js/some-fs.js index e6b31f162..e6b31f162 100644 --- a/integration/bunjs-only-snippets/some-fs.js +++ b/test/bun.js/some-fs.js diff --git a/integration/bunjs-only-snippets/sql-raw.test.js b/test/bun.js/sql-raw.test.js index ea7f72bd6..ea7f72bd6 100644 --- a/integration/bunjs-only-snippets/sql-raw.test.js +++ b/test/bun.js/sql-raw.test.js diff --git a/integration/bunjs-only-snippets/sqlite.test.js b/test/bun.js/sqlite.test.js index 2250f97f0..2250f97f0 100644 --- a/integration/bunjs-only-snippets/sqlite.test.js +++ b/test/bun.js/sqlite.test.js diff --git a/integration/bunjs-only-snippets/streams.test.js b/test/bun.js/streams.test.js index ccbea1d09..ccbea1d09 100644 --- a/integration/bunjs-only-snippets/streams.test.js +++ b/test/bun.js/streams.test.js diff --git a/integration/bunjs-only-snippets/text-encoder.test.js b/test/bun.js/text-encoder.test.js index 5687e0222..5687e0222 100644 --- a/integration/bunjs-only-snippets/text-encoder.test.js +++ b/test/bun.js/text-encoder.test.js diff --git a/integration/bunjs-only-snippets/toml-fixture.toml b/test/bun.js/toml-fixture.toml index 090563ef7..090563ef7 100644 --- a/integration/bunjs-only-snippets/toml-fixture.toml +++ b/test/bun.js/toml-fixture.toml diff --git a/integration/bunjs-only-snippets/toml.test.js b/test/bun.js/toml.test.js index 44141b2d4..44141b2d4 100644 --- a/integration/bunjs-only-snippets/toml.test.js +++ b/test/bun.js/toml.test.js diff --git a/integration/bunjs-only-snippets/transpiler.test.js b/test/bun.js/transpiler.test.js index f8da4c18c..f8da4c18c 100644 --- a/integration/bunjs-only-snippets/transpiler.test.js +++ b/test/bun.js/transpiler.test.js diff --git a/integration/bunjs-only-snippets/tsconfig.json b/test/bun.js/tsconfig.json index 9a6c36e06..9a6c36e06 100644 --- a/integration/bunjs-only-snippets/tsconfig.json +++ b/test/bun.js/tsconfig.json diff --git a/integration/bunjs-only-snippets/unsafe.test.js b/test/bun.js/unsafe.test.js index 741dc0241..741dc0241 100644 --- a/integration/bunjs-only-snippets/unsafe.test.js +++ b/test/bun.js/unsafe.test.js diff --git a/integration/bunjs-only-snippets/url.test.ts b/test/bun.js/url.test.ts index 37ea2008b..37ea2008b 100644 --- a/integration/bunjs-only-snippets/url.test.ts +++ b/test/bun.js/url.test.ts diff --git a/integration/bunjs-only-snippets/wasm-return-1-test.zig b/test/bun.js/wasm-return-1-test.zig index d46bdae92..d46bdae92 100644 --- a/integration/bunjs-only-snippets/wasm-return-1-test.zig +++ b/test/bun.js/wasm-return-1-test.zig diff --git a/integration/bunjs-only-snippets/wasm.js b/test/bun.js/wasm.js index a4daaaffe..a4daaaffe 100644 --- a/integration/bunjs-only-snippets/wasm.js +++ b/test/bun.js/wasm.js diff --git a/integration/bunjs-only-snippets/wasm.test.js b/test/bun.js/wasm.test.js index ab88d5beb..ab88d5beb 100644 --- a/integration/bunjs-only-snippets/wasm.test.js +++ b/test/bun.js/wasm.test.js diff --git a/integration/bunjs-only-snippets/web-globals.test.js b/test/bun.js/web-globals.test.js index ac7c22e84..ac7c22e84 100644 --- a/integration/bunjs-only-snippets/web-globals.test.js +++ b/test/bun.js/web-globals.test.js diff --git a/integration/bunjs-only-snippets/websocket.test.js b/test/bun.js/websocket.test.js index ab825fa63..ab825fa63 100644 --- a/integration/bunjs-only-snippets/websocket.test.js +++ b/test/bun.js/websocket.test.js diff --git a/integration/bunjs-only-snippets/writeFileSync.txt b/test/bun.js/writeFileSync.txt index a0fe4515f..a0fe4515f 100644 --- a/integration/bunjs-only-snippets/writeFileSync.txt +++ b/test/bun.js/writeFileSync.txt diff --git a/integration/bunjs-only-snippets/zlib.test.js b/test/bun.js/zlib.test.js index aecb095cc..aecb095cc 100644 --- a/integration/bunjs-only-snippets/zlib.test.js +++ b/test/bun.js/zlib.test.js |