From f7e4eb83694aa007a492ef66c28ffbe6a2dae791 Mon Sep 17 00:00:00 2001 From: Ashcon Partovi Date: Tue, 7 Mar 2023 12:22:34 -0800 Subject: [PATCH] Reorganize tests (#2332) --- .github/workflows/bun-linux-build.yml | 4 +- .github/workflows/bun-mac-x64-baseline.yml | 4 +- .gitignore | 2 + .prettierignore | 9 +- Makefile | 113 +--- bunfig.toml | 4 +- packages/bun-internal-test/package.json | 3 +- .../bun-internal-test/src/runner.node.mjs | 2 +- packages/bun-internal-test/src/runner.ts | 94 --- packages/bun-internal-test/tsconfig.json | 1 + .../.gitignore => .prettierignore} | 1 - test/README.md | 172 ++--- test/apps/bun-create-next.sh | 57 -- test/apps/bun-create-react.sh | 20 - test/apps/bun-dev-index-html.sh | 69 -- test/apps/bun-dev.sh | 55 -- test/apps/bun-init-check.sh | 26 - test/apps/bun-install-lockfile-status.sh | 65 -- test/apps/bun-install-utf8.sh | 14 - test/apps/bun-install.sh | 89 --- test/apps/bun-run-check-nameless-package.json | 6 - test/apps/bun-run-check-package.json | 7 - test/apps/bun-run-check.sh | 67 -- test/bun.js/.prettierignore | 2 - test/bun.js/bun.lockb | Bin 9454 -> 0 bytes test/bun.js/bunEnv.ts | 6 - test/bun.js/bunExe.ts | 3 - .../always-bundled-module | 1 - .../bundled/always-bundled-module/cjs.js | 10 - .../bundled/always-bundled-module/esm.js | 5 - .../always-bundled-module/package.json | 4 - test/bun.js/bundled/entrypoint.ts | 13 - test/bun.js/bundled/package.json | 12 - .../i-am-bundled/cjs.js | 10 - .../i-am-bundled/esm.js | 5 - .../i-am-bundled/package.json | 4 - test/bun.js/bundled/tsconfig.json | 6 - .../bun.js/file-importing-nonexistent-file.js | 1 - test/bun.js/google-fixture.html | 632 ------------------ test/bun.js/import.live.rexport.js | 2 - test/bun.js/module-require.snapshot.js | 1 - test/bun.js/package.json | 10 - test/bun.js/readdir.js | 9 - test/bun.js/snapshots.debug.js | 7 - test/bun.js/snapshots.js | 7 - test/bun.js/some-fs.js | 45 -- test/bun.js/test-programs/bigpipe-r.c | 26 - test/bun.js/test-programs/bigpipe-w.c | 26 - test/bun.js/test_scope_debug.ts | 172 ----- test/bun.js/tiny-typed-emitter.snapshot.js | 7 - test/bun.js/tsconfig.json | 12 - test/bun.lockb | Bin 0 -> 31909 bytes test/{bun.js => bundler}/decorators.test.ts | 0 test/{bun.js => bundler}/inline.macro.js | 0 test/{bun.js => bundler}/macro-check.js | 0 test/{bun.js => bundler}/transpiler.test.js | 0 .../hot}/hot-runner-imported.js | 0 test/{bun.js => cli/hot}/hot-runner.js | 0 test/{bun.js => cli/hot}/hot.test.ts | 3 +- .../install/bad-workspace.test.ts | 3 +- test/{bun.js => cli}/install/bar-0.0.2.tgz | Bin test/{bun.js => cli}/install/baz-0.0.3.tgz | Bin test/{bun.js => cli}/install/baz-0.0.5.tgz | Bin test/{bun.js => cli}/install/bun-add.test.ts | 3 +- .../install/bun-install.test.ts | 3 +- test/{bun.js => cli}/install/bun-link.test.ts | 3 +- test/{bun.js => cli}/install/bun-pm.test.ts | 3 +- test/{bun.js => cli}/install/bunx.test.ts | 3 +- .../{bun.js => cli}/install/dummy.registry.ts | 0 test/{bun.js => cli}/install/moo-0.1.0.tgz | Bin test/{bun.js => cli/run}/log-test.test.ts | 3 +- test/{bun.js => cli/run}/preload-test.test.js | 3 +- .../bun-link-pkg-fixture.js | 12 - test/fixtures/bun-link-pkg-fixture/bun.lockb | Bin 1191 -> 0 bytes .../bun-link-pkg-fixture/package-lock.json | 30 - .../bun-link-pkg-fixture/package.json | 11 - .../bun-link-to-pkg-fixture/.gitignore | 169 ----- .../bun-link-to-pkg-fixture/README.md | 15 - .../bun-link-to-pkg-fixture/bun.lockb | Bin 1527 -> 0 bytes .../fixtures/bun-link-to-pkg-fixture/index.js | 1 - .../bun-link-to-pkg-fixture/package.json | 12 - .../bun-link-to-pkg-fixture/tsconfig.json | 14 - test/{bun.js/gc.ts => harness.ts} | 13 +- .../bun}/console/console-iterator-run.js | 0 .../bun}/console/console-iterator.test.js | 2 +- .../bun/dns}/resolve-dns.test.ts | 4 +- test/{bun.js => js/bun/ffi}/ffi-test.c | 0 .../bun/ffi}/ffi.test.fixture.callback.c | 3 - .../bun/ffi}/ffi.test.fixture.receiver.c | 0 test/{bun.js => js/bun/ffi}/ffi.test.js | 15 +- test/{bun.js => js/bun}/globals.test.js | 0 .../bun/http}/bun-server.test.ts | 0 test/{bun.js => js/bun/http}/fetch.js.txt | 0 test/{bun.js => js/bun/http}/fixture.html.gz | Bin test/{bun.js => js/bun/http}/proxy.test.js | 2 +- .../bun/http/serve.leak.ts} | 0 test/{bun.js => js/bun/http}/serve.test.ts | 0 .../bun/io}/bun-streams-test-fifo.sh | 0 test/{bun.js => js/bun/io}/bun-write.test.js | 2 +- test/{bun.js => js/bun/io}/emptyFile | 0 test/js/bun/io/fetch.js.txt | 46 ++ test/{bun.js => js/bun/jsc}/bun-jsc.test.js | 0 test/{bun.js => js/bun/jsc}/shadow.test.js | 0 test/{bun.js/socket => js/bun/net}/echo.js | 0 .../socket => js/bun/net}/socket.test.ts | 2 +- .../{bun.js => js/bun/net}/tcp-server.test.ts | 2 +- test/{bun.js => js/bun/plugin}/hello.svelte | 0 test/{bun.js => js/bun/plugin}/hello2.svelte | 0 test/{bun.js => js/bun/plugin}/plugins.d.ts | 0 .../{bun.js => js/bun/plugin}/plugins.test.ts | 2 +- test/{bun.js => js/bun/resolve}/baz.js | 0 .../file-importing-nonexistent-file.js | 1 + test/{bun.js/esm => js/bun/resolve}/first.mjs | 0 .../bun/resolve}/import-meta.test.js | 12 +- .../bun/resolve}/import-require-tla.js | 0 .../bun/resolve}/import.live.decl.js | 0 .../resolve}/import.live.rexport-require.js | 0 test/js/bun/resolve/import.live.rexport.js | 2 + .../bun/resolve/png}/test-png-import.test.js | 0 .../bun/resolve/png}/test-png.png | 0 .../resolve}/require-js-top-level-await.js | 0 test/{bun.js => js/bun/resolve}/require-js.js | 0 .../{bun.js => js/bun/resolve}/require-js2.js | 0 .../bun/resolve}/require-json.json | 0 .../require-referenceerror.snapshot.js | 0 .../bun/resolve}/resolve-error.test.ts | 0 .../bun/resolve}/resolve-typescript-file.tsx | 0 .../bun/resolve}/resolve.test.js | 0 .../esm => js/bun/resolve}/second-child.mjs | 0 .../{bun.js/esm => js/bun/resolve}/second.mjs | 0 .../esm => js/bun/resolve}/startEnd.mjs | 0 test/{bun.js/esm => js/bun/resolve}/third.mjs | 0 .../bun/resolve/toml}/toml-fixture.toml | 0 .../bun/resolve/toml}/toml.test.js | 2 +- test/{bun.js => js/bun/spawn}/bash-echo.sh | 0 .../bun/spawn}/bun-spawn-test.js | 0 test/{bun.js => js/bun/spawn}/exit-code-0.js | 0 test/{bun.js => js/bun/spawn}/exit-code-1.js | 0 .../bun/spawn}/exit-code-await-throw-1.js | 0 .../bun/spawn}/exit-code-unhandled-throw.js | 0 .../bun/spawn}/exit-code.test.ts | 2 +- test/{bun.js => js/bun/spawn}/exit.js | 0 .../bun/spawn}/spawn-streaming-stdin.test.ts | 4 +- .../spawn}/spawn-streaming-stdout-repro.js | 0 .../bun/spawn}/spawn-streaming-stdout.test.ts | 4 +- test/{bun.js => js/bun/spawn}/spawn.test.ts | 3 +- test/{bun.js => js/bun/spawn}/stdin-repro.js | 0 .../bun/spawn}/stdio-test-instance-a-lot.js | 0 .../bun/spawn}/stdio-test-instance.js | 0 .../bun/sqlite}/northwind.testdb | Bin .../{bun.js => js/bun/sqlite}/sql-raw.test.js | 0 .../bun/sqlite}/sqlite-cross-process.js | 0 test/{bun.js => js/bun/sqlite}/sqlite.test.js | 2 +- test/{bun.js => js/bun/test}/bigint.test.js | 0 test/{bun.js => js/bun/test}/bun-test.test.ts | 0 .../bun/test}/jest-doesnt-auto-import.js | 0 .../bun/test}/jest-hooks.test.ts | 0 .../bun/test}/nested-describes.test.ts | 0 .../test-auto-import-jest-globals.test.js | 0 .../{bun.js => js/bun/test}/test-test.test.ts | 3 +- .../bun/util}/arraybuffersink.test.ts | 2 +- test/{bun.js => js/bun/util}/concat.test.js | 1 - test/{bun.js => js/bun/util}/empty.js | 0 .../bun/util}/escapeHTML.test.js | 1 - test/{bun.js => js/bun/util}/fileUrl.test.js | 0 test/{bun.js => js/bun/util}/filesink.test.ts | 0 .../bun/util}/filesystem_router.test.ts | 0 test/{bun.js => js/bun/util}/hash.test.js | 2 +- .../bun/util}/index-of-line.test.ts | 0 test/{bun.js => js/bun/util}/inspect.test.js | 2 +- test/{bun.js => js/bun/util}/mmap.test.js | 2 +- test/{bun.js => js/bun/util}/peek.test.ts | 0 .../bun/util}/reportError.test.js | 0 test/{bun.js => js/bun/util}/sleep.js | 0 .../{bun.js => js/bun/util}/sleepSync.test.ts | 0 test/{bun.js => js/bun/util}/unsafe.test.js | 2 +- test/{bun.js => js/bun/util}/which.test.ts | 0 test/{bun.js => js/bun/wasm}/hello-wasi.wasm | Bin test/{bun.js => js/bun/wasm}/wasi.test.js | 3 +- .../bun/wasm}/wasm-return-1-test.zig | 0 test/{bun.js => js/bun/wasm}/wasm.js | 0 .../bun/websocket}/websocket-server.test.ts | 51 +- .../first_party/undici}/undici.test.ts | 0 .../node/assert}/assert-test.test.ts | 0 test/{bun.js => js/node}/buffer.test.js | 2 +- .../child-process-stdio.test.js | 3 +- .../child_process}/child_process-node.test.js | 3 +- .../node/child_process}/child_process.test.ts | 2 +- .../node/child_process}/readFileSync.txt | 0 .../node/child_process}/spawned-child.js | 0 .../node/crypto}/crypto-scrypt.test.js | 0 .../{bun.js => js/node/crypto}/crypto.test.js | 0 .../node/crypto}/node-crypto.test.js | 0 test/{bun.js => js/node}/dirname.test.js | 0 .../node}/disabled-module.test.js | 0 test/{bun.js => js/node/dns}/dns.node.mjs | 0 test/{bun.js => js/node/dns}/node-dns.test.js | 0 .../node/events}/event-emitter.test.ts | 0 .../node/events}/node-builtins.test.js | 0 .../node/fs}/export-*-from.ts | 0 .../node/fs}/export-from.ts | 0 test/{bun.js => js/node/fs}/fs-stream.js | 0 test/{bun.js => js/node/fs}/fs-stream.link.js | 0 test/{bun.js => js/node/fs}/fs.test.ts | 9 +- test/js/node/fs/readFileSync.txt | 1 + test/js/node/fs/test.txt | 0 test/{bun.js => js/node/fs}/writeFileSync.txt | 0 .../node/harness.test.js} | 0 .../node/harness.ts} | 3 +- .../node/http/node-http.fixme.ts} | 49 +- .../node/module}/node-module-module.test.js | 0 .../socket => js/node/net}/node-net.test.ts | 0 test/{bun.js => js/node/os}/os.test.js | 0 test/{bun.js => js/node/path}/path.test.js | 0 .../node/process}/print-process-args.js | 0 .../node/process}/process-args.test.js | 2 +- .../node/process}/process-nexttick.js | 0 .../node/process}/process-nexttick.test.js | 0 .../node/process}/process-stdin-echo.js | 0 .../node/process}/process-stdio.test.ts | 2 +- .../node/process}/process.test.js | 5 +- .../node/readline}/readline.node.test.ts | 2 +- .../readline}/readline_promises.node.test.ts | 2 +- .../node/stream}/bufferlist.test.ts | 0 .../stream}/node-stream-uint8array.test.ts | 0 .../node/stream}/node-stream.test.js | 0 .../string_decoder}/string-decoder.test.js | 2 +- .../node/timers}/node-timers.test.ts | 0 .../node/util}/test-util-types.test.js | 0 .../node}/util/util-promisify.test.js | 0 test/{bun.js => js/node}/util/util.test.js | 0 .../node/v8}/capture-stack-trace.test.js | 0 test/js/node/zlib/fixture.html.gz | Bin 0 -> 16139 bytes test/{bun.js => js/node/zlib}/zlib.test.js | 0 .../third_party/body-parser}/bun.lockb | Bin .../express-body-parser-test.test.ts | 0 .../third_party/body-parser}/package.json | 0 test/js/third_party/esbuild/bun.lockb | Bin 0 -> 8425 bytes .../esbuild}/esbuild-child_process.test.ts | 2 +- .../third_party/esbuild}/esbuild-test.js | 0 test/js/third_party/esbuild/package.json | 6 + .../napi_create_external/bun.lockb | Bin .../napi-create-external.test.ts | 2 +- .../napi_create_external/package.json | 1 + .../react-dom}/react-dom-server.bun.cjs | 0 .../third_party/react-dom}/react-dom.test.tsx | 2 +- .../third_party/svelte}/bun-loader-svelte.ts | 0 test/js/third_party/svelte/hello.svelte | 5 + .../third_party/svelte}/package.json | 0 test/js/third_party/svelte/svelte.test.ts | 21 + .../web/abort}/abort-signal-timeout.test.js | 0 .../web}/console/console-log.expected.txt | 0 .../{bun.js => js/web}/console/console-log.js | 0 .../web}/console/console-log.test.ts | 2 +- .../web/crypto}/web-crypto.test.ts | 0 .../web/encoding}/text-decoder.test.js | 2 +- .../web/encoding}/text-encoder.test.js | 2 +- .../web/encoding}/utf8-encoding-fixture.bin | Bin .../web/fetch}/body-mixin-errors.test.ts | 0 .../web/fetch}/body-stream.test.ts | 0 .../web/fetch}/fetch-gzip.test.ts | 2 +- test/js/web/fetch/fetch.js.txt | 46 ++ test/{bun.js => js/web/fetch}/fetch.test.ts | 2 +- .../web/fetch}/fetch_headers.test.js | 0 test/{bun.js => js/web/fetch}/fixture.html | 0 test/js/web/fetch/fixture.html.gz | Bin 0 -> 16139 bytes test/{bun.js => js/web/html}/FormData.test.ts | 2 +- .../web/html}/form-data-fixture.txt | 0 test/js/web/streams/bun-streams-test-fifo.sh | 8 + test/js/web/streams/fetch.js.txt | 46 ++ .../web/streams}/streams.test.js | 2 +- .../web/timers}/microtask.test.js | 0 .../web/timers}/performance.test.js | 0 .../web/timers}/setImmediate.test.js | 0 .../web/timers}/setInterval.test.js | 0 .../web/timers}/setTimeout.test.js | 0 test/{bun.js => js/web/url}/url.test.ts | 0 test/{bun.js => js/web/util}/atob.test.js | 0 test/{bun.js => js/web}/web-globals.test.js | 2 +- .../web/websocket}/websocket-subprocess.ts | 0 .../web/websocket}/websocket.test.js | 5 +- .../workerd}/html-rewriter.test.js | 2 +- test/macro/assert.tsx | 4 - test/macro/fetchSync.tsx | 9 - test/macro/hello-fetch-macro.tsx | 5 - test/macro/loadMocks.tsx | 29 - test/macro/macro.d.ts | 1 - test/{bun.js => }/mkfifo.ts | 0 test/package.json | 19 + .../issue/00631.test.ts} | 10 +- .../issue/02005.test.ts} | 2 +- test/tsconfig.json | 23 + tsconfig.json | 2 - 293 files changed, 436 insertions(+), 2324 deletions(-) delete mode 100644 packages/bun-internal-test/src/runner.ts rename test/{fixtures/bun-link-pkg-fixture/.gitignore => .prettierignore} (54%) delete mode 100644 test/apps/bun-create-next.sh delete mode 100644 test/apps/bun-create-react.sh delete mode 100644 test/apps/bun-dev-index-html.sh delete mode 100644 test/apps/bun-dev.sh delete mode 100644 test/apps/bun-init-check.sh delete mode 100644 test/apps/bun-install-lockfile-status.sh delete mode 100644 test/apps/bun-install-utf8.sh delete mode 100644 test/apps/bun-install.sh delete mode 100644 test/apps/bun-run-check-nameless-package.json delete mode 100644 test/apps/bun-run-check-package.json delete mode 100644 test/apps/bun-run-check.sh delete mode 100644 test/bun.js/.prettierignore delete mode 100755 test/bun.js/bun.lockb delete mode 100644 test/bun.js/bunEnv.ts delete mode 100644 test/bun.js/bunExe.ts delete mode 120000 test/bun.js/bundled/always-bundled-module/always-bundled-module delete mode 100644 test/bun.js/bundled/always-bundled-module/cjs.js delete mode 100644 test/bun.js/bundled/always-bundled-module/esm.js delete mode 100644 test/bun.js/bundled/always-bundled-module/package.json delete mode 100644 test/bun.js/bundled/entrypoint.ts delete mode 100644 test/bun.js/bundled/package.json delete mode 100644 test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/cjs.js delete mode 100644 test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/esm.js delete mode 100644 test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/package.json delete mode 100644 test/bun.js/bundled/tsconfig.json delete mode 100644 test/bun.js/file-importing-nonexistent-file.js delete mode 100644 test/bun.js/google-fixture.html delete mode 100644 test/bun.js/import.live.rexport.js delete mode 100644 test/bun.js/module-require.snapshot.js delete mode 100644 test/bun.js/package.json delete mode 100644 test/bun.js/readdir.js delete mode 100644 test/bun.js/snapshots.debug.js delete mode 100644 test/bun.js/snapshots.js delete mode 100644 test/bun.js/some-fs.js delete mode 100644 test/bun.js/test-programs/bigpipe-r.c delete mode 100644 test/bun.js/test-programs/bigpipe-w.c delete mode 100644 test/bun.js/test_scope_debug.ts delete mode 100644 test/bun.js/tiny-typed-emitter.snapshot.js delete mode 100644 test/bun.js/tsconfig.json create mode 100755 test/bun.lockb rename test/{bun.js => bundler}/decorators.test.ts (100%) rename test/{bun.js => bundler}/inline.macro.js (100%) rename test/{bun.js => bundler}/macro-check.js (100%) rename test/{bun.js => bundler}/transpiler.test.js (100%) rename test/{bun.js => cli/hot}/hot-runner-imported.js (100%) rename test/{bun.js => cli/hot}/hot-runner.js (100%) rename test/{bun.js => cli/hot}/hot.test.ts (98%) rename test/{bun.js => cli}/install/bad-workspace.test.ts (93%) rename test/{bun.js => cli}/install/bar-0.0.2.tgz (100%) rename test/{bun.js => cli}/install/baz-0.0.3.tgz (100%) rename test/{bun.js => cli}/install/baz-0.0.5.tgz (100%) rename test/{bun.js => cli}/install/bun-add.test.ts (99%) rename test/{bun.js => cli}/install/bun-install.test.ts (99%) rename test/{bun.js => cli}/install/bun-link.test.ts (99%) rename test/{bun.js => cli}/install/bun-pm.test.ts (98%) rename test/{bun.js => cli}/install/bunx.test.ts (98%) rename test/{bun.js => cli}/install/dummy.registry.ts (100%) rename test/{bun.js => cli}/install/moo-0.1.0.tgz (100%) rename test/{bun.js => cli/run}/log-test.test.ts (95%) rename test/{bun.js => cli/run}/preload-test.test.js (98%) delete mode 100755 test/fixtures/bun-link-pkg-fixture/bun-link-pkg-fixture.js delete mode 100755 test/fixtures/bun-link-pkg-fixture/bun.lockb delete mode 100644 test/fixtures/bun-link-pkg-fixture/package-lock.json delete mode 100644 test/fixtures/bun-link-pkg-fixture/package.json delete mode 100644 test/fixtures/bun-link-to-pkg-fixture/.gitignore delete mode 100644 test/fixtures/bun-link-to-pkg-fixture/README.md delete mode 100755 test/fixtures/bun-link-to-pkg-fixture/bun.lockb delete mode 100644 test/fixtures/bun-link-to-pkg-fixture/index.js delete mode 100644 test/fixtures/bun-link-to-pkg-fixture/package.json delete mode 100644 test/fixtures/bun-link-to-pkg-fixture/tsconfig.json rename test/{bun.js/gc.ts => harness.ts} (70%) rename test/{bun.js => js/bun}/console/console-iterator-run.js (100%) rename test/{bun.js => js/bun}/console/console-iterator.test.js (98%) rename test/{bun.js => js/bun/dns}/resolve-dns.test.ts (93%) rename test/{bun.js => js/bun/ffi}/ffi-test.c (100%) rename test/{bun.js => js/bun/ffi}/ffi.test.fixture.callback.c (99%) rename test/{bun.js => js/bun/ffi}/ffi.test.fixture.receiver.c (100%) rename test/{bun.js => js/bun/ffi}/ffi.test.js (98%) rename test/{bun.js => js/bun}/globals.test.js (100%) rename test/{bun.js => js/bun/http}/bun-server.test.ts (100%) rename test/{bun.js => js/bun/http}/fetch.js.txt (100%) rename test/{bun.js => js/bun/http}/fixture.html.gz (100%) rename test/{bun.js => js/bun/http}/proxy.test.js (98%) rename test/{leaks/http-static-leak.ts => js/bun/http/serve.leak.ts} (100%) rename test/{bun.js => js/bun/http}/serve.test.ts (100%) rename test/{bun.js => js/bun/io}/bun-streams-test-fifo.sh (100%) rename test/{bun.js => js/bun/io}/bun-write.test.js (99%) rename test/{bun.js => js/bun/io}/emptyFile (100%) create mode 100644 test/js/bun/io/fetch.js.txt rename test/{bun.js => js/bun/jsc}/bun-jsc.test.js (100%) rename test/{bun.js => js/bun/jsc}/shadow.test.js (100%) rename test/{bun.js/socket => js/bun/net}/echo.js (100%) rename test/{bun.js/socket => js/bun/net}/socket.test.ts (98%) rename test/{bun.js => js/bun/net}/tcp-server.test.ts (98%) rename test/{bun.js => js/bun/plugin}/hello.svelte (100%) rename test/{bun.js => js/bun/plugin}/hello2.svelte (100%) rename test/{bun.js => js/bun/plugin}/plugins.d.ts (100%) rename test/{bun.js => js/bun/plugin}/plugins.test.ts (99%) rename test/{bun.js => js/bun/resolve}/baz.js (100%) create mode 100644 test/js/bun/resolve/file-importing-nonexistent-file.js rename test/{bun.js/esm => js/bun/resolve}/first.mjs (100%) rename test/{bun.js => js/bun/resolve}/import-meta.test.js (92%) rename test/{bun.js => js/bun/resolve}/import-require-tla.js (100%) rename test/{bun.js => js/bun/resolve}/import.live.decl.js (100%) rename test/{bun.js => js/bun/resolve}/import.live.rexport-require.js (100%) create mode 100644 test/js/bun/resolve/import.live.rexport.js rename test/{bun.js => js/bun/resolve/png}/test-png-import.test.js (100%) rename test/{bun.js => js/bun/resolve/png}/test-png.png (100%) rename test/{bun.js => js/bun/resolve}/require-js-top-level-await.js (100%) rename test/{bun.js => js/bun/resolve}/require-js.js (100%) rename test/{bun.js => js/bun/resolve}/require-js2.js (100%) rename test/{bun.js => js/bun/resolve}/require-json.json (100%) rename test/{bun.js => js/bun/resolve}/require-referenceerror.snapshot.js (100%) rename test/{bun.js => js/bun/resolve}/resolve-error.test.ts (100%) rename test/{bun.js => js/bun/resolve}/resolve-typescript-file.tsx (100%) rename test/{bun.js => js/bun/resolve}/resolve.test.js (100%) rename test/{bun.js/esm => js/bun/resolve}/second-child.mjs (100%) rename test/{bun.js/esm => js/bun/resolve}/second.mjs (100%) rename test/{bun.js/esm => js/bun/resolve}/startEnd.mjs (100%) rename test/{bun.js/esm => js/bun/resolve}/third.mjs (100%) rename test/{bun.js => js/bun/resolve/toml}/toml-fixture.toml (100%) rename test/{bun.js => js/bun/resolve/toml}/toml.test.js (97%) rename test/{bun.js => js/bun/spawn}/bash-echo.sh (100%) rename test/{bun.js => js/bun/spawn}/bun-spawn-test.js (100%) rename test/{bun.js => js/bun/spawn}/exit-code-0.js (100%) rename test/{bun.js => js/bun/spawn}/exit-code-1.js (100%) rename test/{bun.js => js/bun/spawn}/exit-code-await-throw-1.js (100%) rename test/{bun.js => js/bun/spawn}/exit-code-unhandled-throw.js (100%) rename test/{bun.js => js/bun/spawn}/exit-code.test.ts (95%) rename test/{bun.js => js/bun/spawn}/exit.js (100%) rename test/{bun.js => js/bun/spawn}/spawn-streaming-stdin.test.ts (93%) rename test/{bun.js => js/bun/spawn}/spawn-streaming-stdout-repro.js (100%) rename test/{bun.js => js/bun/spawn}/spawn-streaming-stdout.test.ts (92%) rename test/{bun.js => js/bun/spawn}/spawn.test.ts (99%) rename test/{bun.js => js/bun/spawn}/stdin-repro.js (100%) rename test/{bun.js => js/bun/spawn}/stdio-test-instance-a-lot.js (100%) rename test/{bun.js => js/bun/spawn}/stdio-test-instance.js (100%) rename test/{bun.js => js/bun/sqlite}/northwind.testdb (100%) rename test/{bun.js => js/bun/sqlite}/sql-raw.test.js (100%) rename test/{bun.js => js/bun/sqlite}/sqlite-cross-process.js (100%) rename test/{bun.js => js/bun/sqlite}/sqlite.test.js (99%) rename test/{bun.js => js/bun/test}/bigint.test.js (100%) rename test/{bun.js => js/bun/test}/bun-test.test.ts (100%) rename test/{bun.js => js/bun/test}/jest-doesnt-auto-import.js (100%) rename test/{bun.js/bun-test => js/bun/test}/jest-hooks.test.ts (100%) rename test/{bun.js/bun-test => js/bun/test}/nested-describes.test.ts (100%) rename test/{bun.js => js/bun/test}/test-auto-import-jest-globals.test.js (100%) rename test/{bun.js => js/bun/test}/test-test.test.ts (99%) rename test/{bun.js => js/bun/util}/arraybuffersink.test.ts (98%) rename test/{bun.js => js/bun/util}/concat.test.js (97%) rename test/{bun.js => js/bun/util}/empty.js (100%) rename test/{bun.js => js/bun/util}/escapeHTML.test.js (99%) rename test/{bun.js => js/bun/util}/fileUrl.test.js (100%) rename test/{bun.js => js/bun/util}/filesink.test.ts (100%) rename test/{bun.js => js/bun/util}/filesystem_router.test.ts (100%) rename test/{bun.js => js/bun/util}/hash.test.js (97%) rename test/{bun.js => js/bun/util}/index-of-line.test.ts (100%) rename test/{bun.js => js/bun/util}/inspect.test.js (99%) rename test/{bun.js => js/bun/util}/mmap.test.js (97%) rename test/{bun.js => js/bun/util}/peek.test.ts (100%) rename test/{bun.js => js/bun/util}/reportError.test.js (100%) rename test/{bun.js => js/bun/util}/sleep.js (100%) rename test/{bun.js => js/bun/util}/sleepSync.test.ts (100%) rename test/{bun.js => js/bun/util}/unsafe.test.js (97%) rename test/{bun.js => js/bun/util}/which.test.ts (100%) rename test/{bun.js => js/bun/wasm}/hello-wasi.wasm (100%) rename test/{bun.js => js/bun/wasm}/wasi.test.js (84%) rename test/{bun.js => js/bun/wasm}/wasm-return-1-test.zig (100%) rename test/{bun.js => js/bun/wasm}/wasm.js (100%) rename test/{bun.js => js/bun/websocket}/websocket-server.test.ts (97%) rename test/{bun.js => js/first_party/undici}/undici.test.ts (100%) rename test/{bun.js => js/node/assert}/assert-test.test.ts (100%) rename test/{bun.js => js/node}/buffer.test.js (99%) rename test/{bun.js => js/node/child_process}/child-process-stdio.test.js (97%) rename test/{bun.js => js/node/child_process}/child_process-node.test.js (99%) rename test/{bun.js => js/node/child_process}/child_process.test.ts (99%) rename test/{bun.js => js/node/child_process}/readFileSync.txt (100%) rename test/{bun.js => js/node/child_process}/spawned-child.js (100%) rename test/{bun.js => js/node/crypto}/crypto-scrypt.test.js (100%) rename test/{bun.js => js/node/crypto}/crypto.test.js (100%) rename test/{bun.js => js/node/crypto}/node-crypto.test.js (100%) rename test/{bun.js => js/node}/dirname.test.js (100%) rename test/{bun.js => js/node}/disabled-module.test.js (100%) rename test/{bun.js => js/node/dns}/dns.node.mjs (100%) rename test/{bun.js => js/node/dns}/node-dns.test.js (100%) rename test/{bun.js => js/node/events}/event-emitter.test.ts (100%) rename test/{bun.js => js/node/events}/node-builtins.test.js (100%) rename test/{fixtures/export-lazy-fs-streams => js/node/fs}/export-*-from.ts (100%) rename test/{fixtures/export-lazy-fs-streams => js/node/fs}/export-from.ts (100%) rename test/{bun.js => js/node/fs}/fs-stream.js (100%) rename test/{bun.js => js/node/fs}/fs-stream.link.js (100%) rename test/{bun.js => js/node/fs}/fs.test.ts (99%) create mode 100644 test/js/node/fs/readFileSync.txt create mode 100644 test/js/node/fs/test.txt rename test/{bun.js => js/node/fs}/writeFileSync.txt (100%) rename test/{bun.js/node-test-helpers.test.js => js/node/harness.test.js} (100%) rename test/{bun.js/node-test-helpers.ts => js/node/harness.ts} (99%) rename test/{bun.js/node-http.test.ts => js/node/http/node-http.fixme.ts} (94%) rename test/{bun.js => js/node/module}/node-module-module.test.js (100%) rename test/{bun.js/socket => js/node/net}/node-net.test.ts (100%) rename test/{bun.js => js/node/os}/os.test.js (100%) rename test/{bun.js => js/node/path}/path.test.js (100%) rename test/{bun.js => js/node/process}/print-process-args.js (100%) rename test/{bun.js => js/node/process}/process-args.test.js (97%) rename test/{bun.js => js/node/process}/process-nexttick.js (100%) rename test/{bun.js => js/node/process}/process-nexttick.test.js (100%) rename test/{bun.js => js/node/process}/process-stdin-echo.js (100%) rename test/{bun.js => js/node/process}/process-stdio.test.ts (99%) rename test/{bun.js => js/node/process}/process.test.js (96%) rename test/{bun.js => js/node/readline}/readline.node.test.ts (99%) rename test/{bun.js => js/node/readline}/readline_promises.node.test.ts (94%) rename test/{bun.js => js/node/stream}/bufferlist.test.ts (100%) rename test/{bun.js => js/node/stream}/node-stream-uint8array.test.ts (100%) rename test/{bun.js => js/node/stream}/node-stream.test.js (100%) rename test/{bun.js => js/node/string_decoder}/string-decoder.test.js (99%) rename test/{bun.js => js/node/timers}/node-timers.test.ts (100%) rename test/{bun.js => js/node/util}/test-util-types.test.js (100%) rename test/{bun.js => js/node}/util/util-promisify.test.js (100%) rename test/{bun.js => js/node}/util/util.test.js (100%) rename test/{bun.js => js/node/v8}/capture-stack-trace.test.js (100%) create mode 100644 test/js/node/zlib/fixture.html.gz rename test/{bun.js => js/node/zlib}/zlib.test.js (100%) rename test/{bun.js/third-party/body-parser-test => js/third_party/body-parser}/bun.lockb (100%) rename test/{bun.js/third-party/body-parser-test => js/third_party/body-parser}/express-body-parser-test.test.ts (100%) rename test/{bun.js/third-party/body-parser-test => js/third_party/body-parser}/package.json (100%) create mode 100755 test/js/third_party/esbuild/bun.lockb rename test/{bun.js => js/third_party/esbuild}/esbuild-child_process.test.ts (92%) rename test/{bun.js => js/third_party/esbuild}/esbuild-test.js (100%) create mode 100644 test/js/third_party/esbuild/package.json rename test/{bun.js/third-party => js/third_party}/napi_create_external/bun.lockb (100%) rename test/{bun.js/third-party => js/third_party}/napi_create_external/napi-create-external.test.ts (99%) rename test/{bun.js/third-party => js/third_party}/napi_create_external/package.json (93%) rename test/{bun.js => js/third_party/react-dom}/react-dom-server.bun.cjs (100%) rename test/{bun.js => js/third_party/react-dom}/react-dom.test.tsx (99%) rename test/{bun.js/bun-loader-svelte => js/third_party/svelte}/bun-loader-svelte.ts (100%) create mode 100644 test/js/third_party/svelte/hello.svelte rename test/{bun.js/bun-loader-svelte => js/third_party/svelte}/package.json (100%) create mode 100644 test/js/third_party/svelte/svelte.test.ts rename test/{bun.js => js/web/abort}/abort-signal-timeout.test.js (100%) rename test/{bun.js => js/web}/console/console-log.expected.txt (100%) rename test/{bun.js => js/web}/console/console-log.js (100%) rename test/{bun.js => js/web}/console/console-log.test.ts (94%) rename test/{bun.js => js/web/crypto}/web-crypto.test.ts (100%) rename test/{bun.js => js/web/encoding}/text-decoder.test.js (99%) rename test/{bun.js => js/web/encoding}/text-encoder.test.js (99%) rename test/{bun.js => js/web/encoding}/utf8-encoding-fixture.bin (100%) rename test/{bun.js => js/web/fetch}/body-mixin-errors.test.ts (100%) rename test/{bun.js => js/web/fetch}/body-stream.test.ts (100%) rename test/{bun.js => js/web/fetch}/fetch-gzip.test.ts (99%) create mode 100644 test/js/web/fetch/fetch.js.txt rename test/{bun.js => js/web/fetch}/fetch.test.ts (99%) rename test/{bun.js => js/web/fetch}/fetch_headers.test.js (100%) rename test/{bun.js => js/web/fetch}/fixture.html (100%) create mode 100644 test/js/web/fetch/fixture.html.gz rename test/{bun.js => js/web/html}/FormData.test.ts (99%) rename test/{bun.js => js/web/html}/form-data-fixture.txt (100%) create mode 100644 test/js/web/streams/bun-streams-test-fifo.sh create mode 100644 test/js/web/streams/fetch.js.txt rename test/{bun.js => js/web/streams}/streams.test.js (99%) rename test/{bun.js => js/web/timers}/microtask.test.js (100%) rename test/{bun.js => js/web/timers}/performance.test.js (100%) rename test/{bun.js => js/web/timers}/setImmediate.test.js (100%) rename test/{bun.js => js/web/timers}/setInterval.test.js (100%) rename test/{bun.js => js/web/timers}/setTimeout.test.js (100%) rename test/{bun.js => js/web/url}/url.test.ts (100%) rename test/{bun.js => js/web/util}/atob.test.js (100%) rename test/{bun.js => js/web}/web-globals.test.js (99%) rename test/{bun.js => js/web/websocket}/websocket-subprocess.ts (100%) rename test/{bun.js => js/web/websocket}/websocket.test.js (98%) rename test/{bun.js => js/workerd}/html-rewriter.test.js (99%) delete mode 100644 test/macro/assert.tsx delete mode 100644 test/macro/fetchSync.tsx delete mode 100644 test/macro/hello-fetch-macro.tsx delete mode 100644 test/macro/loadMocks.tsx delete mode 100644 test/macro/macro.d.ts rename test/{bun.js => }/mkfifo.ts (100%) create mode 100644 test/package.json rename test/{bun.js/repro_631.test.js => regression/issue/00631.test.ts} (78%) rename test/{bun.js/repro_2005.test.js => regression/issue/02005.test.ts} (86%) create mode 100644 test/tsconfig.json diff --git a/.github/workflows/bun-linux-build.yml b/.github/workflows/bun-linux-build.yml index 75c84c7f62..07d7703545 100644 --- a/.github/workflows/bun-linux-build.yml +++ b/.github/workflows/bun-linux-build.yml @@ -188,9 +188,7 @@ jobs: # if: ${{github.event.inputs.use_bun == 'false'}} run: | bun install - bun install --cwd test/bun.js - bun install --cwd test/bun.js/third-party/body-parser-test - #bun install --cwd test/bun.js/third-party/napi_create_external + bun install --cwd test bun install --cwd packages/bun-internal-test node packages/bun-internal-test/src/runner.node.mjs || true - name: Comment on PR diff --git a/.github/workflows/bun-mac-x64-baseline.yml b/.github/workflows/bun-mac-x64-baseline.yml index c4309a66c1..b2430e93b7 100644 --- a/.github/workflows/bun-mac-x64-baseline.yml +++ b/.github/workflows/bun-mac-x64-baseline.yml @@ -428,9 +428,7 @@ jobs: # if: ${{github.event.inputs.use_bun == 'false'}} run: | bun install - bun install --cwd test/bun.js - bun install --cwd test/bun.js/third-party/body-parser-test - #bun install --cwd test/bun.js/third-party/napi_create_external + bun install --cwd test bun install --cwd packages/bun-internal-test node packages/bun-internal-test/src/runner.node.mjs || true - name: Comment on PR diff --git a/.gitignore b/.gitignore index 79930b44e7..49fb9c41d5 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,5 @@ src/deps/c-ares/build src/bun.js/debug-bindings-obj failing-tests.txt +test.txt +myscript.sh \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index b9249b91c4..464309eabd 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,11 +1,4 @@ src/fallback.html -# src/test -test/bun.js/solid-dom-fixtures -test/bun.js/bundled -#src/bun.js/builtins -# src/api/demo -test/snapshots -test/snapshots-no-hmr src/bun.js/WebKit src/bun.js/builtins/js src/*.out.js @@ -13,3 +6,5 @@ src/*out.*.js src/deps src/test/fixtures src/react-refresh.js +test/snapshots +test/snapshots-no-hmr diff --git a/Makefile b/Makefile index c76eddd21d..4df8567ddb 100644 --- a/Makefile +++ b/Makefile @@ -590,8 +590,7 @@ release-types: .PHONY: format format: ## to format the code - -$(PRETTIER) --write 'test/bun.js/*.{js,jsx,ts,tsx}' - -$(PRETTIER) --write 'test/bun.js/solid-dom-fixtures/**/*.{js,jsx,ts,tsx}' + -$(PRETTIER) --write 'test/**/*.{js,jsx,ts,tsx}' .PHONY: lolhtml @@ -619,7 +618,7 @@ boringssl-debug: boringssl-build-debug boringssl-copy .PHONY: compile-ffi-test compile-ffi-test: - clang $(OPTIMIZATION_LEVEL) -shared -undefined dynamic_lookup -o /tmp/bun-ffi-test.dylib -fPIC ./test/bun.js/ffi-test.c + clang $(OPTIMIZATION_LEVEL) -shared -undefined dynamic_lookup -o /tmp/bun-ffi-test.dylib -fPIC ./test/js/bun/ffi/ffi-test.c sqlite: @@ -1095,45 +1094,8 @@ dev: mkdir-dev dev-obj bun-link-lld-debug mkdir-dev: mkdir -p $(DEBUG_PACKAGE_DIR)/bin -test-install: - cd test/scripts && $(NPM_CLIENT) install - -.PHONY: test-bun-dev -test-bun-dev: - BUN_BIN=$(RELEASE_BUN) bash test/apps/bun-dev.sh - BUN_BIN=$(RELEASE_BUN) bash test/apps/bun-dev-index-html.sh - -.PHONY: test-dev-bun-dev -test-dev-bun-dev: - BUN_BIN=$(DEBUG_BUN) bash test/apps/bun-dev.sh - BUN_BIN=$(DEBUG_BUN) bash test/apps/bun-dev-index-html.sh - -.PHONY: test-bun-snapshot -test-bun-snapshot: - rm -rf test/bun.js/snapshots.js - touch test/bun.js/snapshots.js - $(foreach i,$(wildcard test/bun.js/*.snapshot.*),echo "" >> test/bun.js/snapshots.js; echo "// $i" >> test/bun.js/snapshots.js; $(RELEASE_BUN) build $i --platform=bun >> test/bun.js/snapshots.js;) - -.PHONY: test-dev-bun-snapshot -test-dev-bun-snapshot: - rm -rf test/bun.js/snapshots.debug.js - touch test/bun.js/snapshots.debug.js - $(foreach i,$(wildcard test/bun.js/*.snapshot.*),echo "" >> test/bun.js/snapshots.debug.js; echo "// $i" >> test/bun.js/snapshots.debug.js; $(DEBUG_BUN) build $i --platform=bun >> test/bun.js/snapshots.debug.js;) - -.PHONY: test-bun-init -test-bun-init: - BUN_BIN=$(RELEASE_BUN) bash test/apps/bun-init-check.sh - -.PHONY: test-dev-bun-init -test-dev-bun-init: - BUN_BIN=$(DEBUG_BUN) bash test/apps/bun-init-check.sh - -.PHONY: test-bun-wiptest -test-bun-wiptest: test/wiptest/run - cd test/wiptest && BUN_BIN=$(DEBUG_BUN) ./run ./fixtures - -.PHONY: test-all -test-all: test-install test-bun-snapshot test-with-hmr test-no-hmr test-create-next test-create-react test-bun-run test-bun-install test-bun-dev test-bun-init +test-all: + $(RELEASE_BUN) test .PHONY: copy-test-node-modules copy-test-node-modules: @@ -1144,73 +1106,6 @@ copy-test-node-modules: kill-bun: -killall -9 bun bun-debug -.PHONY: test-dev-create-next -test-dev-create-next: - BUN_BIN=$(DEBUG_BUN) bash test/apps/bun-create-next.sh - -.PHONY: test-dev-create-react -test-dev-create-react: - BUN_BIN=$(DEBUG_BUN) bash test/apps/bun-create-react.sh - -.PHONY: test-create-next -test-create-next: - BUN_BIN=$(RELEASE_BUN) bash test/apps/bun-create-next.sh - -.PHONY: test-bun-run -test-bun-run: - cd test/apps && BUN_BIN=$(RELEASE_BUN) bash ./bun-run-check.sh - -.PHONY: test-bun-install -test-bun-install: test-bun-install-git-status - cd test/apps && JS_RUNTIME=$(RELEASE_BUN) NPM_CLIENT=$(RELEASE_BUN) bash ./bun-install.sh - cd test/apps && BUN_BIN=$(RELEASE_BUN) bash ./bun-install-utf8.sh - -.PHONY: test-bun-install-git-status -test-bun-install-git-status: - cd test/apps && JS_RUNTIME=$(RELEASE_BUN) BUN_BIN=$(RELEASE_BUN) bash ./bun-install-lockfile-status.sh - -.PHONY: test-dev-bun-install -test-dev-bun-install: test-dev-bun-install-git-status - cd test/apps && JS_RUNTIME=$(DEBUG_BUN) NPM_CLIENT=$(DEBUG_BUN) bash ./bun-install.sh - cd test/apps && BUN_BIN=$(DEBUG_BUN) bash ./bun-install-utf8.sh - -.PHONY: test-dev-bun-install-git-status -test-dev-bun-install-git-status: - cd test/apps && BUN_BIN=$(DEBUG_BUN) bash ./bun-install-lockfile-status.sh - -.PHONY: test-create-react -test-create-react: - BUN_BIN=$(RELEASE_BUN) bash test/apps/bun-create-react.sh - -.PHONY: test-with-hmr -test-with-hmr: kill-bun copy-test-node-modules - BUN_BIN=$(RELEASE_BUN) node test/scripts/browser.js - -.PHONY: test-no-hmr -test-no-hmr: kill-bun copy-test-node-modules - -killall bun -9; - DISABLE_HMR="DISABLE_HMR" BUN_BIN=$(RELEASE_BUN) node test/scripts/browser.js - -.PHONY: test-dev-with-hmr -test-dev-with-hmr: copy-test-node-modules - -killall bun-debug -9; - BUN_BIN=$(DEBUG_BUN) node test/scripts/browser.js - -.PHONY: test-dev-no-hmr -test-dev-no-hmr: copy-test-node-modules - -killall bun-debug -9; - DISABLE_HMR="DISABLE_HMR" BUN_BIN=$(DEBUG_BUN) node test/scripts/browser.js - -.PHONY: test-dev-bun-hmr -test-dev-bun-run: - cd test/apps && BUN_BIN=$(DEBUG_BUN) bash bun-run-check.sh - -.PHONY: test-dev-all -test-dev-all: test-install test-dev-bun-snapshot test-dev-with-hmr test-dev-no-hmr test-dev-create-next test-dev-create-react test-dev-bun-run test-dev-bun-install test-dev-bun-dev test-dev-bun-init -test-dev-bunjs: - -test-dev: test-dev-with-hmr - jsc-copy-headers: cp $(WEBKIT_DIR)/Source/JavaScriptCore/heap/WeakHandleOwner.h $(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/WeakHandleOwner.h cp $(WEBKIT_DIR)/Source/JavaScriptCore/runtime/LazyClassStructureInlines.h $(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/LazyClassStructureInlines.h diff --git a/bunfig.toml b/bunfig.toml index 8c6c75190a..4e205af4f0 100644 --- a/bunfig.toml +++ b/bunfig.toml @@ -1,8 +1,8 @@ [test] # Large monorepos (like Bun) may want to specify the test directory more specifically -# By default, `bun wiptest` scans every single folder recurisvely which, if you +# By default, `bun test` scans every single folder recurisvely which, if you # have a gigantic submodule (like WebKit), it has to do lots of directory # traversals # # Instead, we can just make it scan only the test directory for Bun's runtime tests -root = "test/bun.js" +root = "test" diff --git a/packages/bun-internal-test/package.json b/packages/bun-internal-test/package.json index 6504f57b48..accc76f77d 100644 --- a/packages/bun-internal-test/package.json +++ b/packages/bun-internal-test/package.json @@ -1,5 +1,6 @@ { "private": true, + "type": "module", "dependencies": { "@actions/core": "^1.10.0" }, @@ -8,6 +9,6 @@ "prettier": "^2.8.2" }, "scripts": { - "test": "bun run src/runner.ts" + "test": "node src/runner.node.mjs" } } diff --git a/packages/bun-internal-test/src/runner.node.mjs b/packages/bun-internal-test/src/runner.node.mjs index 135ee246e8..eca8a9bb14 100644 --- a/packages/bun-internal-test/src/runner.node.mjs +++ b/packages/bun-internal-test/src/runner.node.mjs @@ -129,7 +129,7 @@ function findErrors(data) { } var tests = []; var testFileNames = []; -for (const path of findTests(resolve(cwd, "test/bun.js"))) { +for (const path of findTests(resolve(cwd, "test"))) { testFileNames.push(path); tests.push(runTest(path).catch(console.error)); } diff --git a/packages/bun-internal-test/src/runner.ts b/packages/bun-internal-test/src/runner.ts deleted file mode 100644 index 4b660fe23e..0000000000 --- a/packages/bun-internal-test/src/runner.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { ArrayBufferSink, spawn } from "bun"; -import { readdirSync, openSync, writeSync, truncateSync } from "node:fs"; -import { resolve } from "node:path"; -import * as action from "@actions/core"; -import { StringDecoder } from "node:string_decoder"; - -const cwd = resolve("../.."); -process.chdir(cwd); - -const isAction = !!process.env["GITHUB_ACTION"]; -const errorPattern = /error: ([\S\s]*?)(?=\n.*?at (\/.*):(\d+):(\d+))/gim; - -function* findTests(dir: string, query?: string): Generator { - for (const entry of readdirSync(resolve(dir), { encoding: "utf-8", withFileTypes: true })) { - const path = resolve(dir, entry.name); - if (path.includes("node_modules")) continue; - - if (entry.isDirectory()) { - yield* findTests(path, query); - } else if (entry.isFile() && entry.name.includes(".test.")) { - yield path; - } - } -} - -async function runTest(path: string): Promise { - const name = path.replace(cwd, "").slice(1); - const runner = spawn({ - cmd: ["bun", "test", path], - stdout: "pipe", - stderr: "pipe", - stdin: "ignore", - env: { - ...process.env, - FORCE_COLOR: "1", - }, - }); - const exitCode = await Promise.race([ - new Promise(resolve => { - setTimeout(() => { - runner.kill(); - resolve(124); // Timed Out - }, 60_000); - }), - runner.exited, - ]); - if (isAction) { - const prefix = exitCode === 0 ? "PASS" : `FAIL (exit code ${exitCode})`; - action.startGroup(`${prefix} - ${name}`); - } - for (const stdout of [runner.stdout, runner.stderr]) { - if (!stdout) { - continue; - } - const reader = stdout.getReader(); - while (true) { - const { value, done } = await reader.read(); - if (value) { - console.write(value); - if (isAction) { - findErrors(value); - } - } - if (done) { - break; - } - } - } - if (isAction) { - action.endGroup(); - } -} - -let failed = false; - -function findErrors(data: Uint8Array): void { - const text = new StringDecoder().write(new Buffer(data.buffer)); - for (const [message, _, path, line, col] of text.matchAll(errorPattern)) { - failed = true; - action.error(message, { - file: path.replace(cwd, "").slice(1), - startLine: parseInt(line), - startColumn: parseInt(col), - }); - } - Bun.gc(true); -} - -const tests = []; -for (const path of findTests(resolve(cwd, "test/bun.js"))) { - tests.push(runTest(path).catch(console.error)); -} -await Promise.allSettled(tests); -process.exit(failed ? 1 : 0); diff --git a/packages/bun-internal-test/tsconfig.json b/packages/bun-internal-test/tsconfig.json index 1b2f412201..860a9d3651 100644 --- a/packages/bun-internal-test/tsconfig.json +++ b/packages/bun-internal-test/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "noEmit": true, "lib": ["ESNext"], "module": "ESNext", "target": "ESNext", diff --git a/test/fixtures/bun-link-pkg-fixture/.gitignore b/test/.prettierignore similarity index 54% rename from test/fixtures/bun-link-pkg-fixture/.gitignore rename to test/.prettierignore index 6455d29a68..3c3629e647 100644 --- a/test/fixtures/bun-link-pkg-fixture/.gitignore +++ b/test/.prettierignore @@ -1,2 +1 @@ node_modules -*.bunlockb diff --git a/test/README.md b/test/README.md index 274b19fbfb..36fe3b0057 100644 --- a/test/README.md +++ b/test/README.md @@ -1,145 +1,73 @@ -# Tests in Bun +# Tests -Bun currently has four different kinds of tests +## Finding tests -To run all the tests: +Tests are located in the [`test/`](test/) directory and are organized using the following structure: -```bash -make test-all -bun --cwd=test/bun.js wiptest +* `test/` + * `js/` - tests for JavaScript APIs. + * `cli/` - tests for commands, configs, and stdout. + * `bundler/` - tests for the transpiler/bundler. + * `regression/` - tests that reproduce a specific issue. + * `harness.ts` - utility functions that can be imported from any test. + +The tests in [`test/js/`](test/js/) directory are further categorized by the type of API. + +* `test/js/` + * `bun/` - tests for `Bun`-specific APIs. + * `node/` - tests for Node.js APIs. + * `web/` - tests for Web APIs, like `fetch()`. + * `first_party/` - tests for npm packages that are built-in, like `undici`. + * `third_party/` - tests for npm packages that are not built-in, but are popular, like `esbuild`. + +## Running tests + +To run a test, use Bun's built-in test command: `bun test`. + +```sh +bun test # Run all tests +bun test js/bun # Only run tests in a directory +bun test sqlite.test.ts # Only run a specific test ``` -### Runtime tests +If you encounter lots of errors, try running `bun install`, then trying again. -To run the runtime tests: +## Writing tests -```bash -cd test/bun.js -bun wiptest -``` - -These tests are in [./bun.js](./bun.js) and are files with `.test.js` or `.test.ts` in the filename. - -These test that the runtime behaves as expected. These also test the transpiler, both because test files are transpiled and directly by running the transpiler via `Bun.Transpiler`. - -#### Adding a new test - -1. Create a new file in [./bun.js](./bun.js/) with `.test` in the name. - -These test use `bun:test` as the import (though you can also import from `vitest` or jest and it will work). - -This will eventually be a public test runner for bun, but the reporter isn't very good yet and it doesn't run in parallel. - -The syntax intends for Jest compatibility. +Tests are written in TypeScript (preferred) or JavaScript using Jest's `describe()`, `test()`, and `expect()` APIs. ```ts -import { describe, expect, it } from "bun:test"; +import { describe, test, expect } from "bun:test"; +import { gcTick } from "harness"; -describe("Example", () => { - it("should work", () => { - expect(1).toBe(1); +describe("TextEncoder", () => { + test("can encode a string", async () => { + const encoder = new TextEncoder(); + const actual = encoder.encode("bun"); + await gcTick(); + expect(actual).toBe(new Uint8Array([0x62, 0x75, 0x6E])); }); }); ``` -### Browser tests +If you are fixing a bug that was reported from a GitHub issue, remember to add a test in the `test/regression/` directory. -Browser tests run end-to-end inside of Puppeteer and execute code transpiled by `bun dev`. These tests are in [./snippets](./snippets). +```ts +// test/regression/issue/02005.test.ts -The interface is: +import { it, expect } from "bun:test"; -```js -// this function is called after import() -// if testDone() is never called, the test fails -export function test() { - return testDone(import.meta.url); -} +it("regex literal should work with non-latin1", () => { + const text = "这是一段要替换的文字"; + expect(text.replace(new RegExp("要替换"), "")).toBe("这是一段的文字"); + expect(text.replace(/要替换/, "")).toBe("这是一段的文字"); +}); ``` -On success, it saves a snapshot to [./snapshots](./snapshots) which is checked into git. +In the future, a bot will automatically close or re-open issues when a regression is detected or resolved. -#### Adding a new test - -1. Create a new file in the `snippets` directory. -2. Append the filename to [./scripts/snippets.json](./scripts/snippets.json) -3. Run `bun dev` inside this folder in one terminal window -4. Run `make integration-test-dev` - -These tests are run twice. Once with HMR enabled and once with HMR disabled. HMR changes the output enough to warrant it's own special treatment. - -#### Running the tests - -To run the browser tests with HMR on a production build: - -```bash -make test-with-hmr -``` - -To run the browser tests without HMR on a production build: - -```bash -make test-with-no-hmr -``` - -To run the browser tests with HMR on a debug build: - -```bash -make test-dev-with-hmr -``` - -To run the browser tests without HMR on a debug build: - -```bash -make test-dev-no-hmr -``` - -To run the browser tests on whatever version of bun is running on port 3000: - -```bash -make integration-test-dev -``` - -These were the first tests bun started with - -#### Running the tests - -Run `bun wiptest ${part-of-file-name}` - -If you run the test in the top-level bun repo directory, it will take an extra couple seconds because `bun wiptest` will scan through all of WebKit recursively. Consider running it in the `bun.js` directory instead. - -### CLI tests - -These run the bash files in the `apps` directory. - -They check end-to-end that the CLI works as expected. - -```bash -# Install dependencies for running tests -# Does not run tests -make test-install - -# Check a Create React App created via `bun create react ./foo` returns HTML -make test-create-react - -# Check a Next.js app created via `bun create next ./foo` SSRs successfully -make test-create-next - -# Check that bun run works for the same CLI args passed to npm run -make test-bun-run - -# Check that "react" installed via bun install loads successfully -# and that deleting/adding updates the lockfile as expected -make test-bun-install - -# Check that serving public paths works correctly -# and that files which should be transpiled are transpiled and files which shouldn't be aren't -make test-bun-dev -``` - -### Zig tests +## Zig tests These tests live in various `.zig` files throughout Bun's codebase, leveraging Zig's builtin `test` keyword. -Currently, they're not run automatically nor is there a simple way to run all of them. - -This is an area bun needs to improve in. +Currently, they're not run automatically nor is there a simple way to run all of them. We will make this better soon. diff --git a/test/apps/bun-create-next.sh b/test/apps/bun-create-next.sh deleted file mode 100644 index d8e148282c..0000000000 --- a/test/apps/bun-create-next.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# The important part of this test: make sure that bun.js successfully loads -# The most likely reason for this test to fail is that something broke in the JavaScriptCore <> bun integration -killall -9 $(basename $BUN_BIN) || echo "" - -rm -rf /tmp/next-app -mkdir -p /tmp/next-app -$BUN_BIN create next /tmp/next-app - -if (($?)); then - echo "bun create failed" - exit 1 -fi - -echo "hi!" >/tmp/next-app/public/file.txt -echo "export default 'string';" >/tmp/next-app/file.js - -cd /tmp/next-app -BUN_CRASH_WITHOUT_JIT=1 $BUN_BIN dev --port 8087 & -sleep 0.1 -curl --fail -Ss http://localhost:8087/ - -if [[ "$(curl --fail -sS http://localhost:8087/file.txt)" != "hi!" ]]; then - echo "" - echo "" - echo "" - echo "ERR: Expected 'hi!', got '$(curl --fail -sS http://localhost:8087/file.txt)'" - killall -9 $(basename $BUN_BIN) || echo "" - exit 1 -fi - -if [[ "$(curl --fail -sS http://localhost:8087/file.js)" != *"string"* ]]; then - echo "" - echo "" - echo "" - echo "ERR: Expected file to contain string got '$(curl --fail -sS http://localhost:8087/file.js)'" - killall -9 $(basename $BUN_BIN) || echo "" - exit 1 -fi - -# very simple HMR test -echo "export default 'string';" >/tmp/next-app/file2.js -sleep 0.1 - -if [[ "$(curl --fail -sS http://localhost:8087/file2.js)" != *"string"* ]]; then - echo "" - echo "" - echo "" - echo "ERR: Expected file to contain string got '$(curl --fail -sS http://localhost:8087/file2.js)'" - killall -9 $(basename $BUN_BIN) || echo "" - exit 1 -fi - -killall -9 $(basename $BUN_BIN) || echo "" diff --git a/test/apps/bun-create-react.sh b/test/apps/bun-create-react.sh deleted file mode 100644 index 564a59d35e..0000000000 --- a/test/apps/bun-create-react.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -killall -9 $(basename $BUN_BIN) || echo "" - -rm -rf /tmp/react-app -mkdir -p /tmp/react-app -$BUN_BIN create react /tmp/react-app - - -if (($?)); then - echo "bun create failed" - exit 1 -fi - -cd /tmp/react-app -BUN_CRASH_WITHOUT_JIT=1 $BUN_BIN dev --port 8087 & -sleep 0.005 - -curl --fail http://localhost:8087/ && curl --fail http://localhost:8087/src/index.jsx && killall -9 $(basename $BUN_BIN) && echo "✅ bun create react passed." -exit $? diff --git a/test/apps/bun-dev-index-html.sh b/test/apps/bun-dev-index-html.sh deleted file mode 100644 index f22f8df514..0000000000 --- a/test/apps/bun-dev-index-html.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -killall -9 $(basename $BUN_BIN) || echo "" - -dir=$(mktemp -d) - -index_content="index.html" -bacon_content="bacon.html" -js_content="if(0) { var foo = 'TEST FAILED'; }" -static_content="PASS" -css_not_transpiled_content="@import url(/index.js); @import url(/i-dont-exist.css); @import url('/i-dont-exist.css'); @import url(\"/i-dont-exist.css\");" -css_is_transpiled_import="*{background-color:red;}" -css_is_transpiled="@import url(./css_is_transpiled_import.css);" - -echo $index_content >"$dir/index.html" -echo $js_content >"$dir/index.js" -echo $bacon_content >"$dir/bacon.html" -echo $static_content >"$dir/static.txt" -echo $css_not_transpiled_content >"$dir/css_not_transpiled_content.css" - -cd $dir -$BUN_BIN dev --port 8087 & -sleep 0.005 - -if [[ "$(curl --fail -sS http://localhost:8087/)" != "$index_content" ]]; then - echo "ERR: Expected '$index_content', got '$(curl --fail -sS http://localhost:8087/)'" - exit 1 -fi - -if [[ "$(curl --fail -sS http://localhost:8087/index)" != "$index_content" ]]; then - echo "ERR: Expected '$index_content', got '$(curl --fail -sS http://localhost:8087/index)'" - exit 1 -fi - -if [[ "$(curl --fail -sS http://localhost:8087/static.txt)" != "PASS" ]]; then - echo "ERR: Expected static file, got '$(curl --fail -sS http://localhost:8087/static.txt)'" - exit 1 -fi - -# Check that the file is actually transpiled -if [[ "$(curl --fail -sS http://localhost:8087/index.js)" == *"TEST FAILED"* ]]; then - echo "ERR: Expected file to be transpiled, got '$(curl --fail -sS http://localhost:8087/index.js)'" - exit 1 -fi - -if [[ "$(curl --fail -sS http://localhost:8087/index.html)" != "$index_content" ]]; then - echo "ERR: Expected '$index_content', got '$(curl --fail -sS http://localhost:8087/index.html)'" - exit 1 -fi - -if [[ "$(curl --fail -sS http://localhost:8087/foo/foo)" != "$index_content" ]]; then - echo "ERR: Expected '$index_content', got '$(curl --fail -sS http://localhost:8087/index.html)'" - exit 1 -fi - -if [[ "$(curl --fail -sS http://localhost:8087/bacon)" != "$bacon_content" ]]; then - echo "ERR: Expected '$bacon_content', got '$(curl --fail -sS http://localhost:8087/bacon)'" - exit 1 -fi - -if [[ "$(curl --fail -sS http://localhost:8087/bacon.html)" != "$bacon_content" ]]; then - echo "ERR: Expected '$bacon_content', got '$(curl --fail -sS http://localhost:8087/bacon.html)'" - exit 1 -fi - -killall -9 $(basename $BUN_BIN) || echo "" -echo "✅ bun dev index html check passed." diff --git a/test/apps/bun-dev.sh b/test/apps/bun-dev.sh deleted file mode 100644 index ea15c1d21d..0000000000 --- a/test/apps/bun-dev.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -killall -9 $(basename $BUN_BIN) || echo "" - -dir=$(mktemp -d) - -index_content="index.html" -bacon_content="bacon.html" -js_content="console.log('hi')" - -mkdir -p $dir/public - -echo $index_content >"$dir/public/index.html" -echo $js_content >"$dir/index.js" -echo $bacon_content >"$dir/public/bacon.html" - -cd $dir - -$BUN_BIN dev --port 8087 & -sleep 0.005 - -if [ "$(curl --fail -sS http://localhost:8087/)" != "$index_content" ]; then - echo "ERR: Expected '$index_content', got '$(curl --fail -sS http://localhost:8087/)'" - exit 1 -fi - -if [ "$(curl --fail -sS http://localhost:8087/index)" != "$index_content" ]; then - echo "ERR: Expected '$index_content', got '$(curl --fail -sS http://localhost:8087/index)'" - exit 1 -fi - -if [ "$(curl --fail -sS http://localhost:8087/index.html)" != "$index_content" ]; then - echo "ERR: Expected '$index_content', got '$(curl --fail -sS http://localhost:8087/index.html)'" - exit 1 -fi - -if [ "$(curl --fail -sS http://localhost:8087/foo/foo)" != "$index_content" ]; then - echo "ERR: Expected '$index_content', got '$(curl --fail -sS http://localhost:8087/index.html)'" - exit 1 -fi - -if [ "$(curl --fail -sS http://localhost:8087/bacon)" != "$bacon_content" ]; then - echo "ERR: Expected '$index_content', got '$(curl --fail -sS http://localhost:8087/bacon)'" - exit 1 -fi - -if [ "$(curl --fail -sS http://localhost:8087/bacon.html)" != "$bacon_content" ]; then - echo "ERR: Expected '$index_content', got '$(curl --fail -sS http://localhost:8087/bacon.html)'" - exit 1 -fi - -killall -9 $(basename $BUN_BIN) || echo "" -echo "✅ bun dev index html check passed." diff --git a/test/apps/bun-init-check.sh b/test/apps/bun-init-check.sh deleted file mode 100644 index d0077cb60d..0000000000 --- a/test/apps/bun-init-check.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -# TODO: move this test to bun once we have a child_process equivalent. -(killall -9 $(basename $BUN_BIN) || echo "") >/dev/null 2>&1 - -rm -rf /tmp/bun-init-check -mkdir -p /tmp/bun-init-check - -cd /tmp/bun-init-check - -$BUN_BIN init -y - -if (($?)); then - echo "Bun init failed" - exit 1 -fi - -SHASUM_RESULT=$(cat index.ts .gitignore tsconfig.json package.json | shasum) - -# This test will fail when the minor version of Bun changes. -if [[ "${SHASUM_RESULT}" != "10eabf5101a3ef999bd67232a7af33542c525ec6 -" ]]; then - echo -e "Bun init shasum mismatch\n expected: b1548bb4e806f0506fd1b27ae8901d2e84926774\n actual: ${SHASUM_RESULT}" - exit 1 -fi - -exit 0 diff --git a/test/apps/bun-install-lockfile-status.sh b/test/apps/bun-install-lockfile-status.sh deleted file mode 100644 index fc39a6dd6e..0000000000 --- a/test/apps/bun-install-lockfile-status.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -killall -9 $(basename $BUN_BIN) || echo "" - -dir=$(mktemp -d) - -cd $dir - -$BUN_BIN add react - -echo "node_modules" >.gitignore - -git init && git add . && git commit -am "Initial commit" - -$BUN_BIN install - -ORIG_LOCKFILE="$($BUN_BIN pm hash-string)" - -[[ -z $(git status --untracked-files=no --porcelain) ]] || { - echo "ERR: Expected empty git status, got '$(git status --untracked-files=no --porcelain)'" - exit 1 -} - -$BUN_BIN add react - -NEW_LOCKFILE="$($BUN_BIN pm hash-string)" - -diff <(echo "$ORIG_LOCKFILE") <(echo "$NEW_LOCKFILE") || { - echo "ERR: Expected lockfile to be unchanged, got '$NEW_LOCKFILE'" - exit 1 -} - -ORIG_HASH=$($BUN_BIN bun.lockb --hash) - -$BUN_BIN remove react -$BUN_BIN add react - -NEW_HASH=$($BUN_BIN bun.lockb --hash) - -diff <(echo "$ORIG_HASH") <(echo "$NEW_HASH") || { - echo "ERR: Expected hash to be unchanged, got '$NEW_HASH'" - exit 1 -} - -echo '{ "dependencies": { "react": "17.0.2", "react-dom": "17.0.2" } }' >package.json - -$BUN_BIN install - -echo "var {version} = JSON.parse(require(\"fs\").readFileSync('./node_modules/react-dom/package.json', 'utf8')); if (version !== '17.0.2') {throw new Error('Unexpected react-dom version');}; " >index.js -$BUN_BIN run ./index.js - -echo "var {version} = JSON.parse(require(\"fs\").readFileSync('./node_modules/react/package.json', 'utf8')); if (version !== '17.0.2') {throw new Error('Unexpected react version');}; " >index.js -$BUN_BIN run ./index.js - -# This is just making sure that the JS was executed -realpath -e node_modules/react-dom >/dev/null || { - echo "ERR: Expected react-dom to be installed" - exit 1 -} -realpath -e node_modules/react >/dev/null || { - echo "ERR: Expected react to be installed" - exit 1 -} diff --git a/test/apps/bun-install-utf8.sh b/test/apps/bun-install-utf8.sh deleted file mode 100644 index ac6b684ed4..0000000000 --- a/test/apps/bun-install-utf8.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -killall -9 $(basename $BUN_BIN) || echo "" - -dir=$(mktemp -d) - -cd $dir - -# https://github.com/oven-sh/bun/issues/115 -echo '{ "author": "Arnaud Barré (https://github.com/ArnaudBarre)" }' >package.json - -$BUN_BIN add react diff --git a/test/apps/bun-install.sh b/test/apps/bun-install.sh deleted file mode 100644 index 18813b2d27..0000000000 --- a/test/apps/bun-install.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -dir=$(mktemp -d) - -cd $dir -${NPM_CLIENT:-$(which bun)} add react react-dom @types/react @babel/parser esbuild vite@3.0.0 - -echo "console.log(typeof require(\"react\").createElement);" >index.js -chmod +x index.js - -JS_RUNTIME=${JS_RUNTIME:-"$(which bun)"} - -if [ "$JS_RUNTIME" == "node" ]; then - result="$(node ./index.js)" -fi - -if [ "$JS_RUNTIME" != "node" ]; then - result="$($JS_RUNTIME run ./index.js)" -fi - -echo "console.log(typeof require(\"react-dom\").render);" >index.js -chmod +x index.js - -JS_RUNTIME=${JS_RUNTIME:-"$(which bun)"} - -# If this fails to run, it means we didn't link @babel/parser correctly -$(which grealpath || which realpath) -e ./node_modules/.bin/parser >/dev/null - -# If this fails to run, it means we didn't link esbuild correctly or esbuild's install script broke -# - https://github.com/evanw/esbuild/issues/2558 -./node_modules/.bin/esbuild --version >/dev/null - -VITE_ESBUILD="$(echo node_modules/vite/node_modules/esbuild-*)" -$VITE_ESBUILD/bin/esbuild --version >/dev/null - -if [ "$JS_RUNTIME" == "node" ]; then - result="$(node ./index.js)" -fi - -if [ "$JS_RUNTIME" != "node" ]; then - result="$($JS_RUNTIME run ./index.js)" -fi - -if [ "$result" != "function" ]; then - echo "ERR: Expected 'function', got '$result'" - exit 1 -fi - -${NPM_CLIENT:-$(which bun)} remove react-dom - -if [ -d "node_modules/react-dom" ]; then - echo "ERR: react-dom module still exists in $dir" - exit 1 -fi - -yarn_dot_lock=$(${NPM_CLIENT:-$(which bun)} bun.lockb) - -if echo "$yarn_dot_lock" | grep -q "react-dom"; then - echo "ERR: react-dom module still exists in lockfile" - exit 1 -fi - -${NPM_CLIENT:-$(which bun)} remove @types/react - -yarn_dot_lock=$(${NPM_CLIENT:-$(which bun)} bun.lockb) - -if echo "$yarn_dot_lock" | grep -q "@types/react"; then - echo "ERR: @types/react module still exists in lockfile" - exit 1 -fi - -if echo "$yarn_dot_lock" | grep -q "@types/react"; then - echo "ERR: @types/react module still exists in $dir" - exit 1 -fi - -${NPM_CLIENT:-$(which bun)} remove react - -if [ -d "node_modules/react" ]; then - echo "ERR: react module still exists in $dir" - exit 1 -fi - -if [ -d "bun.lockb" ]; then - echo "ERR: empty bun.lockb should be deleted" - exit 1 -fi diff --git a/test/apps/bun-run-check-nameless-package.json b/test/apps/bun-run-check-nameless-package.json deleted file mode 100644 index 8ace036137..0000000000 --- a/test/apps/bun-run-check-nameless-package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "scripts": { - "this-should-work": "echo \"✅ bun run test passed!\"", - "argv": "node -e 'console.log(process.argv)'" - } -} diff --git a/test/apps/bun-run-check-package.json b/test/apps/bun-run-check-package.json deleted file mode 100644 index b6eeda0462..0000000000 --- a/test/apps/bun-run-check-package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "check", - "scripts": { - "this-should-work": "echo \"✅ bun run test passed!\"", - "argv": "node -e 'console.log(process.argv)'" - } -} diff --git a/test/apps/bun-run-check.sh b/test/apps/bun-run-check.sh deleted file mode 100644 index 25432c4227..0000000000 --- a/test/apps/bun-run-check.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash - -# TODO: move this test to bun once we have a child_process equivalent. -(killall -9 $(basename $BUN_BIN) || echo "") >/dev/null 2>&1 - -# https://github.com/oven-sh/bun/issues/40 -# Define a function (details aren't important) -fn() { :; } -# The important bit: export the function -export -f fn - -rm -rf /tmp/bun-run-check -mkdir -p /tmp/bun-run-check - -cp ./bun-run-check-package.json /tmp/bun-run-check/package.json -cd /tmp/bun-run-check - -$BUN_BIN run bash -- -c "" - -if (($?)); then - echo "Bash exported functions are broken" - exit 1 -fi - -# We need to run these tests for two variations: -# bun run foo "bar" -# bun run foo -- "bar" -# the "--" should be ignored -# in earlier versions of bun, it was required to be present - -$BUN_BIN run bash -c "" -if (($?)); then - echo "Bash exported functions are broken" - exit 1 -fi - -# https://github.com/oven-sh/bun/issues/53 -rm -f /tmp/bun-run-out.expected.txt /tmp/bun-run-out.txt >/dev/null 2>&1 - -$BUN_BIN run --silent argv -- foo bar baz >/tmp/bun-run-out.txt -npm run --silent argv -- foo bar baz >/tmp/bun-run-out.expected.txt - -cmp -s /tmp/bun-run-out.expected.txt /tmp/bun-run-out.txt -if (($?)); then - echo "argv failed" - exit 1 -fi - -rm -f /tmp/bun-run-out.expected.txt /tmp/bun-run-out.txt >/dev/null 2>&1 - -$BUN_BIN run --silent argv foo bar baz >/tmp/bun-run-out.txt -npm run --silent argv -- foo bar baz >/tmp/bun-run-out.expected.txt - -cmp -s /tmp/bun-run-out.expected.txt /tmp/bun-run-out.txt -if (($?)); then - echo "argv failed" - exit 1 -fi - -$BUN_BIN run --silent this-should-work - -if (($?)); then - echo "this-should work failed" - exit 1 -fi - -exit 0 diff --git a/test/bun.js/.prettierignore b/test/bun.js/.prettierignore deleted file mode 100644 index 91b589eb2a..0000000000 --- a/test/bun.js/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -third-party diff --git a/test/bun.js/bun.lockb b/test/bun.js/bun.lockb deleted file mode 100755 index 0c6a33d3d134119c1a670365239ac729a4e6f9eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9454 zcmeHMc|6ox8z1~c_NZJ*$(EKGV+q+MQI=Fno36oNY7EVcwQ?0%l9Kkci58KvM3!3$ zA?3DRMSC}LNlB7>3-38Ib7o0zZ_GdMeLwH{d}f~C?|IJiJSc^?ST9Jd-QThAg}+(yzMm8{E$zZ2J`~G-WN5pN2|7j%8G~yH zEqswLQ@CXiGfhb^dgdY(B*oCQoUb8mWqf8weY}gw{^z;vULs+lNe#YBKPE&p_lxZ; zcw{zC^0BF+Ljyfd?n6oxgEG}UsRwsYtiqAvxYo~2C1g~_C^J=qli6CE7c(q7Z`*cH zauVM-F3xM_S=I7MFO6pI`)sL~^@-^`(UG)Ux?s+zrl>rL4N3*alAmUNsqf03NAaXv zPd!{K;kJKXTi`X&J)sJi23FAp|3olOaK49Akp6O@1P7HSwLS5P?KR` zApKWB#}w!Tf|Cb7S@`e+1?iW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6th __esModule; - -export { __esModule, foo as default }; diff --git a/test/bun.js/bundled/always-bundled-module/package.json b/test/bun.js/bundled/always-bundled-module/package.json deleted file mode 100644 index 5029c16959..0000000000 --- a/test/bun.js/bundled/always-bundled-module/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "always-bundled-module", - "version": "1.0.0" -} diff --git a/test/bun.js/bundled/entrypoint.ts b/test/bun.js/bundled/entrypoint.ts deleted file mode 100644 index b9a17b538a..0000000000 --- a/test/bun.js/bundled/entrypoint.ts +++ /dev/null @@ -1,13 +0,0 @@ -import "i-am-bundled/cjs"; -import "i-am-bundled/esm"; -import "always-bundled-module/esm"; -import "always-bundled-module/cjs"; -import { foo } from "i-am-bundled/esm"; -import { foo as foo2 } from "always-bundled-module/esm"; -import cJS from "always-bundled-module/cjs"; - -foo(); -foo2(); -cJS(); - -export default cJS(); diff --git a/test/bun.js/bundled/package.json b/test/bun.js/bundled/package.json deleted file mode 100644 index cce72af9c3..0000000000 --- a/test/bun.js/bundled/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "to-bundle", - "scripts": { - "prebundle": "rm -rf node_modules; cp -r to_bundle_node_modules node_modules; ln -s always-bundled-module node_modules/always-bundled-module", - "bundle": "${BUN_BIN:-$(which bun)} bun ./entrypoint.ts" - }, - "bun": { - "alwaysBundle": [ - "always-bundled-module" - ] - } -} diff --git a/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/cjs.js b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/cjs.js deleted file mode 100644 index 087697589b..0000000000 --- a/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/cjs.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - default: 0xdeadbeef, - default() { - return "ok"; - }, - default: true, - ok() { - return true; - }, -}; diff --git a/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/esm.js b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/esm.js deleted file mode 100644 index 28e702881b..0000000000 --- a/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/esm.js +++ /dev/null @@ -1,5 +0,0 @@ -const __esModule = true; - -export const foo = () => __esModule; - -export { __esModule, foo as default }; diff --git a/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/package.json b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/package.json deleted file mode 100644 index 661a80b2d1..0000000000 --- a/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "i-am-bundled", - "version": "1.0.0" -} diff --git a/test/bun.js/bundled/tsconfig.json b/test/bun.js/bundled/tsconfig.json deleted file mode 100644 index 3ccb11ae46..0000000000 --- a/test/bun.js/bundled/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "paths": {}, - "baseUrl": ".", - } -} \ No newline at end of file diff --git a/test/bun.js/file-importing-nonexistent-file.js b/test/bun.js/file-importing-nonexistent-file.js deleted file mode 100644 index 1136a7d8c2..0000000000 --- a/test/bun.js/file-importing-nonexistent-file.js +++ /dev/null @@ -1 +0,0 @@ -import "./does-not-exist.js"; diff --git a/test/bun.js/google-fixture.html b/test/bun.js/google-fixture.html deleted file mode 100644 index a5042789e4..0000000000 --- a/test/bun.js/google-fixture.html +++ /dev/null @@ -1,632 +0,0 @@ - - - - - - - - Google - - - - - - - -
-
- Search Images - Maps - Play - YouTube - News - Gmail - Drive - More » -
- -
-
-
-
-
-
-

-
-
- - - - - - -
  - -
- -
-
- - -
- Advanced search -
- - -
-
-

- -

- © 2022 - Privacy - Terms -

-
- - - - - diff --git a/test/bun.js/import.live.rexport.js b/test/bun.js/import.live.rexport.js deleted file mode 100644 index e4accd2ba4..0000000000 --- a/test/bun.js/import.live.rexport.js +++ /dev/null @@ -1,2 +0,0 @@ -export { foo, setFoo } from "./import.live.decl"; -import { foo as bar } from "./import.live.decl"; diff --git a/test/bun.js/module-require.snapshot.js b/test/bun.js/module-require.snapshot.js deleted file mode 100644 index d0270bb4c8..0000000000 --- a/test/bun.js/module-require.snapshot.js +++ /dev/null @@ -1 +0,0 @@ -console.log(module.require("react")); diff --git a/test/bun.js/package.json b/test/bun.js/package.json deleted file mode 100644 index 709dc6602c..0000000000 --- a/test/bun.js/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "bun-tests", - "dependencies": { - "esbuild": "0.15.13", - "uuid": "^9.0.0", - "tiny-typed-emitter": "^1.0.0", - "svelte": "^3.52.0" - }, - "prettier": "../../.prettierrc.cjs" -} diff --git a/test/bun.js/readdir.js b/test/bun.js/readdir.js deleted file mode 100644 index 18c111d0a0..0000000000 --- a/test/bun.js/readdir.js +++ /dev/null @@ -1,9 +0,0 @@ -const { readdirSync } = require("fs"); - -const count = parseInt(process.env.ITERATIONS || "1", 10) || 1; - -for (let i = 0; i < count; i++) { - readdirSync("."); -} - -console.log(readdirSync(".")); diff --git a/test/bun.js/snapshots.debug.js b/test/bun.js/snapshots.debug.js deleted file mode 100644 index cb774b3828..0000000000 --- a/test/bun.js/snapshots.debug.js +++ /dev/null @@ -1,7 +0,0 @@ -// test/bun.js/module-require.snapshot.js -import { __require as require } from "bun:wrap"; -console.log(import.meta.require("/Users/jarred/Code/bun/node_modules/react/index.js")); - -// test/bun.js/require-referenceerror.snapshot.js - -// test/bun.js/tiny-typed-emitter.snapshot.js diff --git a/test/bun.js/snapshots.js b/test/bun.js/snapshots.js deleted file mode 100644 index cb774b3828..0000000000 --- a/test/bun.js/snapshots.js +++ /dev/null @@ -1,7 +0,0 @@ -// test/bun.js/module-require.snapshot.js -import { __require as require } from "bun:wrap"; -console.log(import.meta.require("/Users/jarred/Code/bun/node_modules/react/index.js")); - -// test/bun.js/require-referenceerror.snapshot.js - -// test/bun.js/tiny-typed-emitter.snapshot.js diff --git a/test/bun.js/some-fs.js b/test/bun.js/some-fs.js deleted file mode 100644 index c162ed45a5..0000000000 --- a/test/bun.js/some-fs.js +++ /dev/null @@ -1,45 +0,0 @@ -const { mkdirSync, existsSync } = require("fs"); - -var performance = globalThis.performance; -if (!performance) { - try { - performance = require("perf_hooks").performance; - } catch (e) {} -} - -const count = parseInt(process.env.ITERATIONS || "1", 10) || 1; -var tempdir = `/tmp/some-fs-test/dir/${Date.now()}/hi`; - -for (let i = 0; i < count; i++) { - tempdir += `/${i.toString(36)}`; -} - -if (existsSync(tempdir)) { - throw new Error(`existsSync reports ${tempdir} exists, but it probably does not`); -} - -var origTempDir = tempdir; -var iterations = new Array(count * count).fill(""); -var total = 0; -for (let i = 0; i < count; i++) { - for (let j = 0; j < count; j++) { - iterations[total++] = `${origTempDir}/${j.toString(36)}-${i.toString(36)}`; - } -} -tempdir = origTempDir; -mkdirSync(origTempDir, { recursive: true }); -const recurse = { recursive: false }; -const start = performance.now(); -for (let i = 0; i < total; i++) { - mkdirSync(iterations[i], recurse); -} - -console.log("MKDIR " + total + " depth took:", performance.now() - start, "ms"); - -if (!existsSync(tempdir)) { - throw new Error("Expected directory to exist after mkdirSync, but it doesn't"); -} - -if (mkdirSync(tempdir, { recursive: true })) { - throw new Error("mkdirSync shouldn't return directory name on existing directories"); -} diff --git a/test/bun.js/test-programs/bigpipe-r.c b/test/bun.js/test-programs/bigpipe-r.c deleted file mode 100644 index 1acd94f7bc..0000000000 --- a/test/bun.js/test-programs/bigpipe-r.c +++ /dev/null @@ -1,26 +0,0 @@ -#include - -char one_mb_pipe_buf_1[1024 * 1024]; - - int main(int argc, char* argv[]) - { - for (int i = 0; i < sizeof(one_mb_pipe_buf_1); i++) { - one_mb_pipe_buf_1[i] = i % 256; - } - - while (1) { - - - size_t amt = 0; - size_t cnt = 0; - - cnt = 0; - while (cnt < sizeof(one_mb_pipe_buf_1)) { - amt = read(0, one_mb_pipe_buf_1 + cnt, sizeof(one_mb_pipe_buf_1) - cnt); - if (amt == 0) { - break; - } - cnt += amt; - } - } - } \ No newline at end of file diff --git a/test/bun.js/test-programs/bigpipe-w.c b/test/bun.js/test-programs/bigpipe-w.c deleted file mode 100644 index 1acd94f7bc..0000000000 --- a/test/bun.js/test-programs/bigpipe-w.c +++ /dev/null @@ -1,26 +0,0 @@ -#include - -char one_mb_pipe_buf_1[1024 * 1024]; - - int main(int argc, char* argv[]) - { - for (int i = 0; i < sizeof(one_mb_pipe_buf_1); i++) { - one_mb_pipe_buf_1[i] = i % 256; - } - - while (1) { - - - size_t amt = 0; - size_t cnt = 0; - - cnt = 0; - while (cnt < sizeof(one_mb_pipe_buf_1)) { - amt = read(0, one_mb_pipe_buf_1 + cnt, sizeof(one_mb_pipe_buf_1) - cnt); - if (amt == 0) { - break; - } - cnt += amt; - } - } - } \ No newline at end of file diff --git a/test/bun.js/test_scope_debug.ts b/test/bun.js/test_scope_debug.ts deleted file mode 100644 index fbc79acd84..0000000000 --- a/test/bun.js/test_scope_debug.ts +++ /dev/null @@ -1,172 +0,0 @@ -type AnyFunction = (...args: any[]) => any; -export function wrap({ - test: test_, - it: it_, - describe: describe_, - beforeEach: beforeEach_ = undefined, - beforeAll: beforeAll_ = undefined, - afterEach: afterEach_ = undefined, - afterAll: afterAll_ = undefined, -}: any) { - if (it_ === undefined) { - it_ = test_; - } - - var describe = (label, cb: AnyFunction) => { - return describe_( - label, - cb instanceof async function () {}.constructor - ? async () => { - console.log(`DESCRIBE [Enter] ${label}`); - try { - return await cb(); - } catch (e) { - throw e; - } finally { - console.log(`DESCRIBE [Exit] ${label}`); - } - } - : () => { - console.log(`DESCRIBE [Enter] ${label}`); - try { - return cb(); - } catch (e) { - throw e; - } finally { - console.log(`DESCRIBE [Exit] ${label}`); - } - }, - ); - }; - - var it = (label, cb: AnyFunction) => { - console.log("Before", label); - return it_( - label, - cb instanceof async function () {}.constructor - ? async () => { - console.log(`TEST [Enter] ${label}`); - try { - return await cb(); - } catch (e) { - throw e; - } finally { - console.log(`TEST [Exit] ${label}`); - } - } - : () => { - console.log(`TEST [Enter] ${label}`); - try { - return cb(); - } catch (e) { - throw e; - } finally { - console.log(`TEST [Exit] ${label}`); - } - }, - ); - }; - - var beforeEach = (cb: AnyFunction) => { - return beforeEach_( - cb instanceof async function () {}.constructor - ? async () => { - console.log(`BEFORE EACH [Enter]`); - try { - return await cb(); - } catch (e) { - throw e; - } finally { - console.log(`BEFORE EACH [Exit]`); - } - } - : () => { - console.log(`BEFORE EACH [Enter]`); - try { - return cb(); - } catch (e) { - throw e; - } finally { - console.log(`BEFORE EACH [Exit]`); - } - }, - ); - }; - var beforeAll = (cb: AnyFunction) => { - return beforeAll_( - cb instanceof async function () {}.constructor - ? async () => { - console.log(`BEFORE ALL [Enter]`); - try { - return await cb(); - } catch (e) { - throw e; - } finally { - console.log(`BEFORE ALL [Exit]`); - } - } - : () => { - console.log(`BEFORE ALL [Enter]`); - try { - return cb(); - } catch (e) { - throw e; - } finally { - console.log(`BEFORE ALL [Exit]`); - } - }, - ); - }; - var afterEach = (cb: AnyFunction) => { - return afterEach_( - cb instanceof async function () {}.constructor - ? async () => { - console.log(`AFTER EACH [Enter]`); - try { - return await cb(); - } catch (e) { - throw e; - } finally { - console.log(`AFTER EACH [Exit]`); - } - } - : () => { - console.log(`AFTER EACH [Enter]`); - try { - return cb(); - } catch (e) { - throw e; - } finally { - console.log(`AFTER EACH [Exit]`); - } - }, - ); - }; - var afterAll = (cb: AnyFunction) => { - return afterAll_( - cb instanceof async function () {}.constructor - ? async () => { - console.log(`AFTER ALL [Enter]`); - try { - return await cb(); - } catch (e) { - throw e; - } finally { - console.log(`AFTER ALL [Exit]`); - } - } - : () => { - console.log(`AFTER ALL [Enter]`); - try { - return cb(); - } catch (e) { - throw e; - } finally { - console.log(`AFTER ALL [Exit]`); - } - }, - ); - }; - - return { describe, it, beforeEach, beforeAll, afterEach, afterAll }; -} diff --git a/test/bun.js/tiny-typed-emitter.snapshot.js b/test/bun.js/tiny-typed-emitter.snapshot.js deleted file mode 100644 index 37299f9864..0000000000 --- a/test/bun.js/tiny-typed-emitter.snapshot.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * https://github.com/oven-sh/bun/issues/453 - */ -import { createRequire as topLevelCreateRequire } from "module"; -import { TypedEmitter as TypedEmitter7 } from "tiny-typed-emitter"; - -const require = topLevelCreateRequire(import.meta.url); diff --git a/test/bun.js/tsconfig.json b/test/bun.js/tsconfig.json deleted file mode 100644 index 0874dfd7ed..0000000000 --- a/test/bun.js/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "allowSyntheticDefaultImports": true, - "paths": { - "foo/bar": ["baz.js"], - "@faasjs/*": ["*.js"] - }, - "baseUrl": "." - }, - "exclude": ["solid-dom-fixtures", "bundled"] -} diff --git a/test/bun.lockb b/test/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..f724750a9510e851a521267c387dfe19766f99ad GIT binary patch literal 31909 zcmeHw30#a@8240@77|$sl}Lq5`>vfVp-U(wuG{^P|B7qS+gWU z30aCt$-aNjGtH^jy|)G5?_2M=_i^6yp7Z~o=R9Y5&wFNiMt+!TFo&(`!tzsP`i023 z1pA4CFns)7z1>+pOoqEZ+t)dW5uzr_PovQ^h9@wqENpU@mhRG@qFW*T`Qrr3qUt#j zn@cktCa&}SF(4cYL73kf(S&)i5HF78#adH&7qlQICkU^D{oGitEE>%vnB(FfN~5L1 zye`7#-9F0|vkd`^&aP%wwd`6fW4^@jY{5Oeim z`ne&`eO|f%V&r3jsaR}IkS_;wX*A@+IF*-w8ccwAmY*k+%?jeUF$1_f?w}p0O=AW* zdtmukUirlkV|(4eK5Q_E8`C8i3lRPQXEui!%=UTCD<8@=a62KYx2x7c{m6tvWG3ICR?yuwBUjp$!xX+B5{R)}F2n;M-pb2g&dcZU(tmF+*p%CT zh`9E(5bIU$dn8OY;;Oreu!gX)>{=^U~JpxYGgcxnrw<^DsZG6nl!BFm#*zo)TraPJ$ zmL(Q}D*m#49#y)PUrLO3eEdr5-~^Rq&it=3Yd*%Csq(E$ak}FC_T2ehufLV-_H&t) z5tZ|Nwcg_)XWzzp^SxeZ+{8TXvqm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ntiD*cmsfcq(phUl`V+xh~~ZP#2)yP7TS+ZcehC%9{fE)E&^UATqL zY&UqI2H<7~zT?|-*?G? z{`)O1k4_go*9vM!V-rJ>bbuQ`*++GMM+7r-t-a9Dwhbmit z6R;B+-uEMbgLj3~9nWu35mS;2uX$|PzA>EHzW;VlN9!MV7g6rHIkOkC{1E)lo78f! zm14SZxV2CUlDpKBJ}kfBML%iNc87v&y~lFa)M!($^%k5w_<8)Jpf4+cqoc+2`CH+D z0M~yMWwSW0A^*6`(bQL4^fxqBYd>ZXHjjGCKY;1?_j{aRKYz|orNDZc8h^82>%E^E z*Ln-+JL&H>_1X$U*SB3$JHPuRs6-nJCVr2GJ3iWYxT#+yYBL?sv|axy38hbfhLZYK zqW1mn+SV|j`BiNwt1{3~QolcD)QuPRf&@NT_R#9LiJmAqJW`&lvFphqHOU1Pf4|I_`2FX zkzF2O$t8Eg*A { diff --git a/test/bun.js/install/bad-workspace.test.ts b/test/cli/install/bad-workspace.test.ts similarity index 93% rename from test/bun.js/install/bad-workspace.test.ts rename to test/cli/install/bad-workspace.test.ts index bb3f03a86e..1feafc2b0d 100644 --- a/test/bun.js/install/bad-workspace.test.ts +++ b/test/cli/install/bad-workspace.test.ts @@ -1,7 +1,6 @@ import { spawnSync } from "bun"; import { test, describe, expect } from "bun:test"; -import { bunEnv } from "bunEnv"; -import { bunExe } from "bunExe"; +import { bunExe, bunEnv } from "harness"; import { mkdirSync, rmSync, writeFileSync } from "fs"; test("bad workspace path", () => { diff --git a/test/bun.js/install/bar-0.0.2.tgz b/test/cli/install/bar-0.0.2.tgz similarity index 100% rename from test/bun.js/install/bar-0.0.2.tgz rename to test/cli/install/bar-0.0.2.tgz diff --git a/test/bun.js/install/baz-0.0.3.tgz b/test/cli/install/baz-0.0.3.tgz similarity index 100% rename from test/bun.js/install/baz-0.0.3.tgz rename to test/cli/install/baz-0.0.3.tgz diff --git a/test/bun.js/install/baz-0.0.5.tgz b/test/cli/install/baz-0.0.5.tgz similarity index 100% rename from test/bun.js/install/baz-0.0.5.tgz rename to test/cli/install/baz-0.0.5.tgz diff --git a/test/bun.js/install/bun-add.test.ts b/test/cli/install/bun-add.test.ts similarity index 99% rename from test/bun.js/install/bun-add.test.ts rename to test/cli/install/bun-add.test.ts index 9ac54bbc55..d1222993b5 100644 --- a/test/bun.js/install/bun-add.test.ts +++ b/test/cli/install/bun-add.test.ts @@ -1,7 +1,6 @@ import { file, spawn } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, expect, it } from "bun:test"; -import { bunExe } from "bunExe"; -import { bunEnv as env } from "bunEnv"; +import { bunExe, bunEnv as env } from "harness"; import { access, mkdir, mkdtemp, readlink, realpath, rm, writeFile } from "fs/promises"; import { join, relative } from "path"; import { tmpdir } from "os"; diff --git a/test/bun.js/install/bun-install.test.ts b/test/cli/install/bun-install.test.ts similarity index 99% rename from test/bun.js/install/bun-install.test.ts rename to test/cli/install/bun-install.test.ts index 3ea14f27ca..ee515280e4 100644 --- a/test/bun.js/install/bun-install.test.ts +++ b/test/cli/install/bun-install.test.ts @@ -1,7 +1,6 @@ import { file, listen, spawn } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, expect, it } from "bun:test"; -import { bunExe } from "bunExe"; -import { bunEnv as env } from "bunEnv"; +import { bunExe, bunEnv as env } from "harness"; import { access, mkdir, readlink, writeFile } from "fs/promises"; import { join } from "path"; import { diff --git a/test/bun.js/install/bun-link.test.ts b/test/cli/install/bun-link.test.ts similarity index 99% rename from test/bun.js/install/bun-link.test.ts rename to test/cli/install/bun-link.test.ts index c1e1d18908..5b0abe1390 100644 --- a/test/bun.js/install/bun-link.test.ts +++ b/test/cli/install/bun-link.test.ts @@ -1,7 +1,6 @@ import { spawn } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, expect, it } from "bun:test"; -import { bunExe } from "bunExe"; -import { bunEnv as env } from "bunEnv"; +import { bunExe, bunEnv as env } from "harness"; import { access, mkdtemp, readlink, realpath, rm, writeFile } from "fs/promises"; import { basename, join } from "path"; import { tmpdir } from "os"; diff --git a/test/bun.js/install/bun-pm.test.ts b/test/cli/install/bun-pm.test.ts similarity index 98% rename from test/bun.js/install/bun-pm.test.ts rename to test/cli/install/bun-pm.test.ts index 3db2a4ad0b..23b73dfaeb 100644 --- a/test/bun.js/install/bun-pm.test.ts +++ b/test/cli/install/bun-pm.test.ts @@ -1,7 +1,6 @@ import { spawn } from "bun"; import { afterAll, afterEach, beforeAll, beforeEach, expect, it } from "bun:test"; -import { bunExe } from "bunExe"; -import { bunEnv as env } from "bunEnv"; +import { bunExe, bunEnv as env } from "harness"; import { mkdir, writeFile } from "fs/promises"; import { join } from "path"; import { diff --git a/test/bun.js/install/bunx.test.ts b/test/cli/install/bunx.test.ts similarity index 98% rename from test/bun.js/install/bunx.test.ts rename to test/cli/install/bunx.test.ts index 06266fe948..49d6e1c2d5 100644 --- a/test/bun.js/install/bunx.test.ts +++ b/test/cli/install/bunx.test.ts @@ -1,7 +1,6 @@ import { spawn } from "bun"; import { afterEach, beforeEach, expect, it } from "bun:test"; -import { bunExe } from "bunExe"; -import { bunEnv as env } from "bunEnv"; +import { bunExe, bunEnv as env } from "harness"; import { realpathSync } from "fs"; import { mkdtemp, realpath, rm, writeFile } from "fs/promises"; import { tmpdir } from "os"; diff --git a/test/bun.js/install/dummy.registry.ts b/test/cli/install/dummy.registry.ts similarity index 100% rename from test/bun.js/install/dummy.registry.ts rename to test/cli/install/dummy.registry.ts diff --git a/test/bun.js/install/moo-0.1.0.tgz b/test/cli/install/moo-0.1.0.tgz similarity index 100% rename from test/bun.js/install/moo-0.1.0.tgz rename to test/cli/install/moo-0.1.0.tgz diff --git a/test/bun.js/log-test.test.ts b/test/cli/run/log-test.test.ts similarity index 95% rename from test/bun.js/log-test.test.ts rename to test/cli/run/log-test.test.ts index 29f541e322..2e980cb7b0 100644 --- a/test/bun.js/log-test.test.ts +++ b/test/cli/run/log-test.test.ts @@ -2,8 +2,7 @@ import { it, expect } from "bun:test"; import { basename, dirname, join } from "path"; import * as fs from "fs"; import { readableStreamToText, spawnSync } from "bun"; -import { bunExe } from "bunExe"; -import { bunEnv } from "bunEnv"; +import { bunExe, bunEnv } from "harness"; it("should not log .env when quiet", async () => { writeDirectoryTree("/tmp/log-test-silent", { diff --git a/test/bun.js/preload-test.test.js b/test/cli/run/preload-test.test.js similarity index 98% rename from test/bun.js/preload-test.test.js rename to test/cli/run/preload-test.test.js index 76603b3a0a..e0e068f9a0 100644 --- a/test/bun.js/preload-test.test.js +++ b/test/cli/run/preload-test.test.js @@ -3,8 +3,7 @@ import { describe, expect, test } from "bun:test"; import { mkdirSync, realpathSync } from "fs"; import { tmpdir } from "os"; import { join } from "path"; -import { bunEnv } from "./bunEnv"; -import { bunExe } from "./bunExe"; +import { bunEnv, bunExe } from "harness"; const preloadModule = ` import {plugin} from 'bun'; diff --git a/test/fixtures/bun-link-pkg-fixture/bun-link-pkg-fixture.js b/test/fixtures/bun-link-pkg-fixture/bun-link-pkg-fixture.js deleted file mode 100755 index ce5ae872bf..0000000000 --- a/test/fixtures/bun-link-pkg-fixture/bun-link-pkg-fixture.js +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env node - -// package.json name is bun-link-pkg-fixture-1 to ensure we don't rely on dir name -const _ = require("lodash"); - -if (_.isBoolean(true)) { - console.log("Success"); - process.exit(0); -} - -console.error("Fail"); -process.exit(1); diff --git a/test/fixtures/bun-link-pkg-fixture/bun.lockb b/test/fixtures/bun-link-pkg-fixture/bun.lockb deleted file mode 100755 index ff3a1483f214e893239333c998484af1c20d68d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1191 zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_p+m+A-hQ zt%|PMGe2Q6p1h{uw#I~TIgxK79h_6$_)HdT7H0t}0s@d)5a57N4D3+40ZL226oC0+ z3=9o9`6-FT84L_|PxQ8iUfA>cz@swTxt4xc7~fS-eJ;E!tXb)Cu)XfZ(;eIr^JZRo z`(8LwyRpo7-4Q#TkYlnjp}j}XZ;m_Nx-C@lxr5q&@$~5Y{)zcsK+|CsIRe>cKzl$A z6a->XASMBtpsSml|X4Oo8qEmz0ADglEj=GJy`P43n@xXwNo%MP$_{9L_q#o05x+7-0V_gBRim09EMzgs=GpjdXV`X%pjW> z7?hwimrb;hS!}5V(4l5mbjQSKqGxEXXJp8b12qLkqlQFrYHnF-k)CTs zNorAEVoq>LQD$Dcoq{34A`7@hGoU8%Lvsn24aiM~Se*pUgqeBSx&_(kx@nmeC8b5F zx`x<9v5Dzr6=#%`6ck(O>ldY_XBL+fRqEvx9a`FqQr>Q~1YKXO;~^Oaofl+FrN1O&_wih%=4vqR|yDE$Ov7#xT* zFf{lBd162s$Y$UK(w~bhuU=g7WvSg0y{(}a_PnlslYX{C=(Q3fqjbm$pzZ}wS^#Pa zIv-}ZK;Qj4i$h^N1_lR4S+IVXeJ&9-S3&YDP$e*zgWLfIH_E{BFn2IP_16F;t%2?Y zsbK_SZXjL-1Ry>k0I~yS4~z!s!7l!f{~yQ#Dg#Cah`H1@8fGqX1hZsM+^aj=_1S_P zo)gFB>bcfhpQz%E_ICcPTwKPamqJ`l!$PQo}Fo*!-Ar(l2(h-ot5YvDLvJI5xvMDY~*2~N* zE=kPE(Ss#*y^x~RR67MD1BK$us?_{69R(AG#GK6Zy!7+f|We;DHO1_QWI%FN5wEy>p{$WGTy z%d99VElLFmmsA#{7Uuxvtl)}}ROlLF6U8QmU8P=DaYji=L9vy-eo< unknown) { if (!Bun.unsafe.gcAggressionLevel) return block(); const origGC = Bun.unsafe.gcAggressionLevel(); diff --git a/test/bun.js/console/console-iterator-run.js b/test/js/bun/console/console-iterator-run.js similarity index 100% rename from test/bun.js/console/console-iterator-run.js rename to test/js/bun/console/console-iterator-run.js diff --git a/test/bun.js/console/console-iterator.test.js b/test/js/bun/console/console-iterator.test.js similarity index 98% rename from test/bun.js/console/console-iterator.test.js rename to test/js/bun/console/console-iterator.test.js index 053e4382d9..89894fd726 100644 --- a/test/bun.js/console/console-iterator.test.js +++ b/test/js/bun/console/console-iterator.test.js @@ -1,6 +1,6 @@ import { spawnSync, spawn } from "bun"; import { describe, expect, it } from "bun:test"; -import { bunExe } from "bunExe"; +import { bunExe } from "harness"; describe("should work for static input", () => { const inputs = [ diff --git a/test/bun.js/resolve-dns.test.ts b/test/js/bun/dns/resolve-dns.test.ts similarity index 93% rename from test/bun.js/resolve-dns.test.ts rename to test/js/bun/dns/resolve-dns.test.ts index d83e23b56f..52534da13d 100644 --- a/test/bun.js/resolve-dns.test.ts +++ b/test/js/bun/dns/resolve-dns.test.ts @@ -1,6 +1,6 @@ import { dns } from "bun"; import { describe, expect, it, test } from "bun:test"; -import { withoutAggressiveGC } from "gc"; +import { withoutAggressiveGC } from "harness"; describe("dns.lookup", () => { const backends = [process.platform === "darwin" ? "system" : undefined, "libc", "c-ares"].filter(Boolean); @@ -28,7 +28,7 @@ describe("dns.lookup", () => { const [first, second] = await dns.lookup("google.com", { backend }); console.log(first, second); }); - it(backend + " local", async () => { + it.skip(backend + " local", async () => { const [first, second] = await dns.lookup("localhost", { backend }); console.log(first, second); }); diff --git a/test/bun.js/ffi-test.c b/test/js/bun/ffi/ffi-test.c similarity index 100% rename from test/bun.js/ffi-test.c rename to test/js/bun/ffi/ffi-test.c diff --git a/test/bun.js/ffi.test.fixture.callback.c b/test/js/bun/ffi/ffi.test.fixture.callback.c similarity index 99% rename from test/bun.js/ffi.test.fixture.callback.c rename to test/js/bun/ffi/ffi.test.fixture.callback.c index 3b9a465777..624f6cdd01 100644 --- a/test/bun.js/ffi.test.fixture.callback.c +++ b/test/js/bun/ffi/ffi.test.fixture.callback.c @@ -286,9 +286,6 @@ ZIG_REPR_TYPE JSFunctionCall(void* jsGlobalObject, void* callFrame); bool my_callback_function(void* arg0); bool my_callback_function(void* arg0) { -#ifdef INJECT_BEFORE -INJECT_BEFORE; -#endif ZIG_REPR_TYPE arguments[1]; arguments[0] = PTR_TO_JSVALUE(arg0).asZigRepr; return (bool)JSVALUE_TO_BOOL(_FFI_Callback_call((void*)0x0000000000000000ULL, 1, arguments)); diff --git a/test/bun.js/ffi.test.fixture.receiver.c b/test/js/bun/ffi/ffi.test.fixture.receiver.c similarity index 100% rename from test/bun.js/ffi.test.fixture.receiver.c rename to test/js/bun/ffi/ffi.test.fixture.receiver.c diff --git a/test/bun.js/ffi.test.js b/test/js/bun/ffi/ffi.test.js similarity index 98% rename from test/bun.js/ffi.test.js rename to test/js/bun/ffi/ffi.test.js index 1027377829..8b31280c92 100644 --- a/test/bun.js/ffi.test.js +++ b/test/js/bun/ffi/ffi.test.js @@ -1,5 +1,5 @@ import { afterAll, describe, expect, it } from "bun:test"; -// +import { existsSync } from "fs"; import { CFunction, CString, @@ -20,6 +20,7 @@ const dlopen = (...args) => { throw err; } }; +const ok = existsSync("/tmp/bun-ffi-test.dylib"); it("ffi print", async () => { await Bun.write( @@ -607,7 +608,11 @@ it("read", () => { } }); -describe("run ffi", () => { - ffiRunner(false); - ffiRunner(true); -}); +if (ok) { + describe("run ffi", () => { + ffiRunner(false); + ffiRunner(true); + }); +} else { + it.skip("run ffi", () => {}); +} diff --git a/test/bun.js/globals.test.js b/test/js/bun/globals.test.js similarity index 100% rename from test/bun.js/globals.test.js rename to test/js/bun/globals.test.js diff --git a/test/bun.js/bun-server.test.ts b/test/js/bun/http/bun-server.test.ts similarity index 100% rename from test/bun.js/bun-server.test.ts rename to test/js/bun/http/bun-server.test.ts diff --git a/test/bun.js/fetch.js.txt b/test/js/bun/http/fetch.js.txt similarity index 100% rename from test/bun.js/fetch.js.txt rename to test/js/bun/http/fetch.js.txt diff --git a/test/bun.js/fixture.html.gz b/test/js/bun/http/fixture.html.gz similarity index 100% rename from test/bun.js/fixture.html.gz rename to test/js/bun/http/fixture.html.gz diff --git a/test/bun.js/proxy.test.js b/test/js/bun/http/proxy.test.js similarity index 98% rename from test/bun.js/proxy.test.js rename to test/js/bun/http/proxy.test.js index c903efab31..abe05133d5 100644 --- a/test/bun.js/proxy.test.js +++ b/test/js/bun/http/proxy.test.js @@ -1,5 +1,5 @@ import { afterAll, beforeAll, describe, expect, it } from "bun:test"; -import { gc } from "./gc"; +import { gc } from "harness"; let proxy, server; diff --git a/test/leaks/http-static-leak.ts b/test/js/bun/http/serve.leak.ts similarity index 100% rename from test/leaks/http-static-leak.ts rename to test/js/bun/http/serve.leak.ts diff --git a/test/bun.js/serve.test.ts b/test/js/bun/http/serve.test.ts similarity index 100% rename from test/bun.js/serve.test.ts rename to test/js/bun/http/serve.test.ts diff --git a/test/bun.js/bun-streams-test-fifo.sh b/test/js/bun/io/bun-streams-test-fifo.sh similarity index 100% rename from test/bun.js/bun-streams-test-fifo.sh rename to test/js/bun/io/bun-streams-test-fifo.sh diff --git a/test/bun.js/bun-write.test.js b/test/js/bun/io/bun-write.test.js similarity index 99% rename from test/bun.js/bun-write.test.js rename to test/js/bun/io/bun-write.test.js index c324d36a04..c3b9b187bb 100644 --- a/test/bun.js/bun-write.test.js +++ b/test/js/bun/io/bun-write.test.js @@ -1,7 +1,7 @@ import fs from "fs"; import { it, expect, describe } from "bun:test"; import path from "path"; -import { gcTick, withoutAggressiveGC } from "./gc"; +import { gcTick, withoutAggressiveGC } from "harness"; it("Bun.write blob", async () => { await Bun.write(Bun.file("/tmp/response-file.test.txt"), Bun.file(path.join(import.meta.dir, "fetch.js.txt"))); diff --git a/test/bun.js/emptyFile b/test/js/bun/io/emptyFile similarity index 100% rename from test/bun.js/emptyFile rename to test/js/bun/io/emptyFile diff --git a/test/js/bun/io/fetch.js.txt b/test/js/bun/io/fetch.js.txt new file mode 100644 index 0000000000..5a9b52fcf1 --- /dev/null +++ b/test/js/bun/io/fetch.js.txt @@ -0,0 +1,46 @@ + + + + Example Domain + + + + + + + + +
+

Example Domain

+

This domain is for use in illustrative examples in documents. You may use this + domain in literature without prior coordination or asking for permission.

+

More information...

+
+ + diff --git a/test/bun.js/bun-jsc.test.js b/test/js/bun/jsc/bun-jsc.test.js similarity index 100% rename from test/bun.js/bun-jsc.test.js rename to test/js/bun/jsc/bun-jsc.test.js diff --git a/test/bun.js/shadow.test.js b/test/js/bun/jsc/shadow.test.js similarity index 100% rename from test/bun.js/shadow.test.js rename to test/js/bun/jsc/shadow.test.js diff --git a/test/bun.js/socket/echo.js b/test/js/bun/net/echo.js similarity index 100% rename from test/bun.js/socket/echo.js rename to test/js/bun/net/echo.js diff --git a/test/bun.js/socket/socket.test.ts b/test/js/bun/net/socket.test.ts similarity index 98% rename from test/bun.js/socket/socket.test.ts rename to test/js/bun/net/socket.test.ts index 4c58243ef3..881175b242 100644 --- a/test/bun.js/socket/socket.test.ts +++ b/test/js/bun/net/socket.test.ts @@ -1,5 +1,5 @@ import { expect, it } from "bun:test"; -import { bunExe } from "../bunExe"; +import { bunExe } from "harness"; import { connect, spawn } from "bun"; it("should keep process alive only when active", async () => { diff --git a/test/bun.js/tcp-server.test.ts b/test/js/bun/net/tcp-server.test.ts similarity index 98% rename from test/bun.js/tcp-server.test.ts rename to test/js/bun/net/tcp-server.test.ts index 6f3f869ece..ba6927fe33 100644 --- a/test/bun.js/tcp-server.test.ts +++ b/test/js/bun/net/tcp-server.test.ts @@ -1,4 +1,4 @@ -import { listen, connect, TCPSocketListener, TCPSocketOptions, SocketHandler } from "bun"; +import { listen, connect, TCPSocketListener, SocketHandler } from "bun"; import { describe, expect, it } from "bun:test"; import * as JSC from "bun:jsc"; diff --git a/test/bun.js/hello.svelte b/test/js/bun/plugin/hello.svelte similarity index 100% rename from test/bun.js/hello.svelte rename to test/js/bun/plugin/hello.svelte diff --git a/test/bun.js/hello2.svelte b/test/js/bun/plugin/hello2.svelte similarity index 100% rename from test/bun.js/hello2.svelte rename to test/js/bun/plugin/hello2.svelte diff --git a/test/bun.js/plugins.d.ts b/test/js/bun/plugin/plugins.d.ts similarity index 100% rename from test/bun.js/plugins.d.ts rename to test/js/bun/plugin/plugins.d.ts diff --git a/test/bun.js/plugins.test.ts b/test/js/bun/plugin/plugins.test.ts similarity index 99% rename from test/bun.js/plugins.test.ts rename to test/js/bun/plugin/plugins.test.ts index e533cef064..2bac4b4d47 100644 --- a/test/bun.js/plugins.test.ts +++ b/test/js/bun/plugin/plugins.test.ts @@ -131,7 +131,7 @@ plugin({ }); // This is to test that it works when imported from a separate file -import "bun-loader-svelte"; +import "../../third_party/svelte"; describe("require", () => { it("SSRs `

Hello world!

` with Svelte", () => { diff --git a/test/bun.js/baz.js b/test/js/bun/resolve/baz.js similarity index 100% rename from test/bun.js/baz.js rename to test/js/bun/resolve/baz.js diff --git a/test/js/bun/resolve/file-importing-nonexistent-file.js b/test/js/bun/resolve/file-importing-nonexistent-file.js new file mode 100644 index 0000000000..f805e78bcd --- /dev/null +++ b/test/js/bun/resolve/file-importing-nonexistent-file.js @@ -0,0 +1 @@ +import "./does-not-exist.js.js.js.js"; diff --git a/test/bun.js/esm/first.mjs b/test/js/bun/resolve/first.mjs similarity index 100% rename from test/bun.js/esm/first.mjs rename to test/js/bun/resolve/first.mjs diff --git a/test/bun.js/import-meta.test.js b/test/js/bun/resolve/import-meta.test.js similarity index 92% rename from test/bun.js/import-meta.test.js rename to test/js/bun/resolve/import-meta.test.js index 3f89c09f0e..f87c8f89f5 100644 --- a/test/bun.js/import-meta.test.js +++ b/test/js/bun/resolve/import-meta.test.js @@ -1,7 +1,7 @@ import { it, expect } from "bun:test"; import { mkdirSync, rmSync, writeFileSync } from "node:fs"; import * as Module from "node:module"; -import sync from "./require-json.json"; +import sync from "./require-json.json.js"; const { path, dir } = import.meta; @@ -27,7 +27,7 @@ it("require with a query string works on dynamically created content", () => { try { const require = Module.createRequire("/tmp/bun-test-import-meta-dynamic-dir/foo.js"); try { - require("./bar.js?query=123"); + require("./bar.js?query=123.js"); } catch (e) { expect(e.name).toBe("ResolveError"); } @@ -36,7 +36,7 @@ it("require with a query string works on dynamically created content", () => { writeFileSync("/tmp/bun-test-import-meta-dynamic-dir/bar.js", "export default 'hello';", "utf8"); - expect(require("./bar.js?query=123").default).toBe("hello"); + expect(require("./bar.js?query=123.js").default).toBe("hello"); } catch (e) { throw e; } finally { @@ -50,7 +50,7 @@ it("require with a query string works on dynamically created content", () => { it("import.meta.require (json)", () => { expect(import.meta.require("./require-json.json").hello).toBe(sync.hello); const require = Module.createRequire(import.meta.path); - expect(require("./require-json.json").hello).toBe(sync.hello); + expect(require("./require-json.json.js").hello).toBe(sync.hello); }); it("const f = require;require(json)", () => { @@ -148,11 +148,11 @@ it("import.meta.require (javascript, live bindings)", () => { }); it("import.meta.dir", () => { - expect(dir.endsWith("/bun/test/bun.js")).toBe(true); + expect(dir.endsWith("/bun/test/js/bun/resolve")).toBe(true); }); it("import.meta.path", () => { - expect(path.endsWith("/bun/test/bun.js/import-meta.test.js")).toBe(true); + expect(path.endsWith("/bun/test/js/bun/resolve/import-meta.test.js")).toBe(true); }); it('require("bun") works', () => { diff --git a/test/bun.js/import-require-tla.js b/test/js/bun/resolve/import-require-tla.js similarity index 100% rename from test/bun.js/import-require-tla.js rename to test/js/bun/resolve/import-require-tla.js diff --git a/test/bun.js/import.live.decl.js b/test/js/bun/resolve/import.live.decl.js similarity index 100% rename from test/bun.js/import.live.decl.js rename to test/js/bun/resolve/import.live.decl.js diff --git a/test/bun.js/import.live.rexport-require.js b/test/js/bun/resolve/import.live.rexport-require.js similarity index 100% rename from test/bun.js/import.live.rexport-require.js rename to test/js/bun/resolve/import.live.rexport-require.js diff --git a/test/js/bun/resolve/import.live.rexport.js b/test/js/bun/resolve/import.live.rexport.js new file mode 100644 index 0000000000..6709c34660 --- /dev/null +++ b/test/js/bun/resolve/import.live.rexport.js @@ -0,0 +1,2 @@ +export { foo, setFoo } from "./import.live.decl.js"; +import { foo as bar } from "./import.live.decl.js"; diff --git a/test/bun.js/test-png-import.test.js b/test/js/bun/resolve/png/test-png-import.test.js similarity index 100% rename from test/bun.js/test-png-import.test.js rename to test/js/bun/resolve/png/test-png-import.test.js diff --git a/test/bun.js/test-png.png b/test/js/bun/resolve/png/test-png.png similarity index 100% rename from test/bun.js/test-png.png rename to test/js/bun/resolve/png/test-png.png diff --git a/test/bun.js/require-js-top-level-await.js b/test/js/bun/resolve/require-js-top-level-await.js similarity index 100% rename from test/bun.js/require-js-top-level-await.js rename to test/js/bun/resolve/require-js-top-level-await.js diff --git a/test/bun.js/require-js.js b/test/js/bun/resolve/require-js.js similarity index 100% rename from test/bun.js/require-js.js rename to test/js/bun/resolve/require-js.js diff --git a/test/bun.js/require-js2.js b/test/js/bun/resolve/require-js2.js similarity index 100% rename from test/bun.js/require-js2.js rename to test/js/bun/resolve/require-js2.js diff --git a/test/bun.js/require-json.json b/test/js/bun/resolve/require-json.json similarity index 100% rename from test/bun.js/require-json.json rename to test/js/bun/resolve/require-json.json diff --git a/test/bun.js/require-referenceerror.snapshot.js b/test/js/bun/resolve/require-referenceerror.snapshot.js similarity index 100% rename from test/bun.js/require-referenceerror.snapshot.js rename to test/js/bun/resolve/require-referenceerror.snapshot.js diff --git a/test/bun.js/resolve-error.test.ts b/test/js/bun/resolve/resolve-error.test.ts similarity index 100% rename from test/bun.js/resolve-error.test.ts rename to test/js/bun/resolve/resolve-error.test.ts diff --git a/test/bun.js/resolve-typescript-file.tsx b/test/js/bun/resolve/resolve-typescript-file.tsx similarity index 100% rename from test/bun.js/resolve-typescript-file.tsx rename to test/js/bun/resolve/resolve-typescript-file.tsx diff --git a/test/bun.js/resolve.test.js b/test/js/bun/resolve/resolve.test.js similarity index 100% rename from test/bun.js/resolve.test.js rename to test/js/bun/resolve/resolve.test.js diff --git a/test/bun.js/esm/second-child.mjs b/test/js/bun/resolve/second-child.mjs similarity index 100% rename from test/bun.js/esm/second-child.mjs rename to test/js/bun/resolve/second-child.mjs diff --git a/test/bun.js/esm/second.mjs b/test/js/bun/resolve/second.mjs similarity index 100% rename from test/bun.js/esm/second.mjs rename to test/js/bun/resolve/second.mjs diff --git a/test/bun.js/esm/startEnd.mjs b/test/js/bun/resolve/startEnd.mjs similarity index 100% rename from test/bun.js/esm/startEnd.mjs rename to test/js/bun/resolve/startEnd.mjs diff --git a/test/bun.js/esm/third.mjs b/test/js/bun/resolve/third.mjs similarity index 100% rename from test/bun.js/esm/third.mjs rename to test/js/bun/resolve/third.mjs diff --git a/test/bun.js/toml-fixture.toml b/test/js/bun/resolve/toml/toml-fixture.toml similarity index 100% rename from test/bun.js/toml-fixture.toml rename to test/js/bun/resolve/toml/toml-fixture.toml diff --git a/test/bun.js/toml.test.js b/test/js/bun/resolve/toml/toml.test.js similarity index 97% rename from test/bun.js/toml.test.js rename to test/js/bun/resolve/toml/toml.test.js index a1aa09a4c6..17d1674761 100644 --- a/test/bun.js/toml.test.js +++ b/test/js/bun/resolve/toml/toml.test.js @@ -1,5 +1,5 @@ import { describe, it, expect } from "bun:test"; -import { gc } from "./gc"; +import { gc } from "harness"; it("syntax", async () => { gc(); diff --git a/test/bun.js/bash-echo.sh b/test/js/bun/spawn/bash-echo.sh similarity index 100% rename from test/bun.js/bash-echo.sh rename to test/js/bun/spawn/bash-echo.sh diff --git a/test/bun.js/bun-spawn-test.js b/test/js/bun/spawn/bun-spawn-test.js similarity index 100% rename from test/bun.js/bun-spawn-test.js rename to test/js/bun/spawn/bun-spawn-test.js diff --git a/test/bun.js/exit-code-0.js b/test/js/bun/spawn/exit-code-0.js similarity index 100% rename from test/bun.js/exit-code-0.js rename to test/js/bun/spawn/exit-code-0.js diff --git a/test/bun.js/exit-code-1.js b/test/js/bun/spawn/exit-code-1.js similarity index 100% rename from test/bun.js/exit-code-1.js rename to test/js/bun/spawn/exit-code-1.js diff --git a/test/bun.js/exit-code-await-throw-1.js b/test/js/bun/spawn/exit-code-await-throw-1.js similarity index 100% rename from test/bun.js/exit-code-await-throw-1.js rename to test/js/bun/spawn/exit-code-await-throw-1.js diff --git a/test/bun.js/exit-code-unhandled-throw.js b/test/js/bun/spawn/exit-code-unhandled-throw.js similarity index 100% rename from test/bun.js/exit-code-unhandled-throw.js rename to test/js/bun/spawn/exit-code-unhandled-throw.js diff --git a/test/bun.js/exit-code.test.ts b/test/js/bun/spawn/exit-code.test.ts similarity index 95% rename from test/bun.js/exit-code.test.ts rename to test/js/bun/spawn/exit-code.test.ts index 5f1aab9043..cda76a395f 100644 --- a/test/bun.js/exit-code.test.ts +++ b/test/js/bun/spawn/exit-code.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, test } from "bun:test"; -import { bunExe } from "bunExe"; +import { bunExe } from "harness"; import { spawnSync } from "bun"; it("process.exit(1) works", () => { diff --git a/test/bun.js/exit.js b/test/js/bun/spawn/exit.js similarity index 100% rename from test/bun.js/exit.js rename to test/js/bun/spawn/exit.js diff --git a/test/bun.js/spawn-streaming-stdin.test.ts b/test/js/bun/spawn/spawn-streaming-stdin.test.ts similarity index 93% rename from test/bun.js/spawn-streaming-stdin.test.ts rename to test/js/bun/spawn/spawn-streaming-stdin.test.ts index 02067b7193..e2d346ec84 100644 --- a/test/bun.js/spawn-streaming-stdin.test.ts +++ b/test/js/bun/spawn/spawn-streaming-stdin.test.ts @@ -1,9 +1,7 @@ import { it, test, expect } from "bun:test"; import { spawn } from "bun"; -import { bunExe } from "./bunExe"; -import { gcTick } from "gc"; +import { bunExe, bunEnv, gcTick } from "harness"; import { closeSync, openSync } from "fs"; -import { bunEnv } from "./bunEnv"; const N = 100; test("spawn can write to stdin multiple chunks", async () => { diff --git a/test/bun.js/spawn-streaming-stdout-repro.js b/test/js/bun/spawn/spawn-streaming-stdout-repro.js similarity index 100% rename from test/bun.js/spawn-streaming-stdout-repro.js rename to test/js/bun/spawn/spawn-streaming-stdout-repro.js diff --git a/test/bun.js/spawn-streaming-stdout.test.ts b/test/js/bun/spawn/spawn-streaming-stdout.test.ts similarity index 92% rename from test/bun.js/spawn-streaming-stdout.test.ts rename to test/js/bun/spawn/spawn-streaming-stdout.test.ts index bda1031add..75e36ca2c3 100644 --- a/test/bun.js/spawn-streaming-stdout.test.ts +++ b/test/js/bun/spawn/spawn-streaming-stdout.test.ts @@ -1,9 +1,7 @@ import { it, test, expect } from "bun:test"; import { spawn } from "bun"; -import { bunExe } from "./bunExe"; -import { gcTick } from "gc"; +import { bunExe, bunEnv, gcTick } from "harness"; import { closeSync, openSync } from "fs"; -import { bunEnv } from "./bunEnv"; test("spawn can read from stdout multiple chunks", async () => { gcTick(true); diff --git a/test/bun.js/spawn.test.ts b/test/js/bun/spawn/spawn.test.ts similarity index 99% rename from test/bun.js/spawn.test.ts rename to test/js/bun/spawn/spawn.test.ts index def0330ee2..876985e665 100644 --- a/test/bun.js/spawn.test.ts +++ b/test/js/bun/spawn/spawn.test.ts @@ -1,8 +1,7 @@ import { ArrayBufferSink, readableStreamToText, spawn, spawnSync, write } from "bun"; import { describe, expect, it } from "bun:test"; -import { gcTick as _gcTick } from "./gc"; +import { gcTick as _gcTick, bunEnv } from "harness"; import { rmdirSync, unlinkSync, rmSync, writeFileSync } from "node:fs"; -import { bunEnv } from "./bunEnv"; for (let [gcTick, label] of [ [_gcTick, "gcTick"], diff --git a/test/bun.js/stdin-repro.js b/test/js/bun/spawn/stdin-repro.js similarity index 100% rename from test/bun.js/stdin-repro.js rename to test/js/bun/spawn/stdin-repro.js diff --git a/test/bun.js/stdio-test-instance-a-lot.js b/test/js/bun/spawn/stdio-test-instance-a-lot.js similarity index 100% rename from test/bun.js/stdio-test-instance-a-lot.js rename to test/js/bun/spawn/stdio-test-instance-a-lot.js diff --git a/test/bun.js/stdio-test-instance.js b/test/js/bun/spawn/stdio-test-instance.js similarity index 100% rename from test/bun.js/stdio-test-instance.js rename to test/js/bun/spawn/stdio-test-instance.js diff --git a/test/bun.js/northwind.testdb b/test/js/bun/sqlite/northwind.testdb similarity index 100% rename from test/bun.js/northwind.testdb rename to test/js/bun/sqlite/northwind.testdb diff --git a/test/bun.js/sql-raw.test.js b/test/js/bun/sqlite/sql-raw.test.js similarity index 100% rename from test/bun.js/sql-raw.test.js rename to test/js/bun/sqlite/sql-raw.test.js diff --git a/test/bun.js/sqlite-cross-process.js b/test/js/bun/sqlite/sqlite-cross-process.js similarity index 100% rename from test/bun.js/sqlite-cross-process.js rename to test/js/bun/sqlite/sqlite-cross-process.js diff --git a/test/bun.js/sqlite.test.js b/test/js/bun/sqlite/sqlite.test.js similarity index 99% rename from test/bun.js/sqlite.test.js rename to test/js/bun/sqlite/sqlite.test.js index 408fa5a26b..a23c2f0378 100644 --- a/test/bun.js/sqlite.test.js +++ b/test/js/bun/sqlite/sqlite.test.js @@ -2,7 +2,7 @@ import { expect, it, describe } from "bun:test"; import { Database, constants } from "bun:sqlite"; import { existsSync, fstat, realpathSync, rmSync, writeFileSync } from "fs"; import { spawnSync } from "bun"; -import { bunExe } from "bunExe"; +import { bunExe } from "harness"; import { tmpdir } from "os"; var encode = text => new TextEncoder().encode(text); diff --git a/test/bun.js/bigint.test.js b/test/js/bun/test/bigint.test.js similarity index 100% rename from test/bun.js/bigint.test.js rename to test/js/bun/test/bigint.test.js diff --git a/test/bun.js/bun-test.test.ts b/test/js/bun/test/bun-test.test.ts similarity index 100% rename from test/bun.js/bun-test.test.ts rename to test/js/bun/test/bun-test.test.ts diff --git a/test/bun.js/jest-doesnt-auto-import.js b/test/js/bun/test/jest-doesnt-auto-import.js similarity index 100% rename from test/bun.js/jest-doesnt-auto-import.js rename to test/js/bun/test/jest-doesnt-auto-import.js diff --git a/test/bun.js/bun-test/jest-hooks.test.ts b/test/js/bun/test/jest-hooks.test.ts similarity index 100% rename from test/bun.js/bun-test/jest-hooks.test.ts rename to test/js/bun/test/jest-hooks.test.ts diff --git a/test/bun.js/bun-test/nested-describes.test.ts b/test/js/bun/test/nested-describes.test.ts similarity index 100% rename from test/bun.js/bun-test/nested-describes.test.ts rename to test/js/bun/test/nested-describes.test.ts diff --git a/test/bun.js/test-auto-import-jest-globals.test.js b/test/js/bun/test/test-auto-import-jest-globals.test.js similarity index 100% rename from test/bun.js/test-auto-import-jest-globals.test.js rename to test/js/bun/test/test-auto-import-jest-globals.test.js diff --git a/test/bun.js/test-test.test.ts b/test/js/bun/test/test-test.test.ts similarity index 99% rename from test/bun.js/test-test.test.ts rename to test/js/bun/test/test-test.test.ts index c83ee07a53..b834d2152b 100644 --- a/test/bun.js/test-test.test.ts +++ b/test/js/bun/test/test-test.test.ts @@ -1,7 +1,6 @@ import { spawn, spawnSync } from "bun"; import { describe, expect, it, test } from "bun:test"; -import { bunEnv } from "bunEnv"; -import { bunExe } from "bunExe"; +import { bunExe, bunEnv } from "harness"; import { mkdirSync, realpathSync, rmSync, writeFileSync } from "fs"; import { mkdtemp, rm, writeFile } from "fs/promises"; import { tmpdir } from "os"; diff --git a/test/bun.js/arraybuffersink.test.ts b/test/js/bun/util/arraybuffersink.test.ts similarity index 98% rename from test/bun.js/arraybuffersink.test.ts rename to test/js/bun/util/arraybuffersink.test.ts index f0df03d900..373ac11165 100644 --- a/test/bun.js/arraybuffersink.test.ts +++ b/test/js/bun/util/arraybuffersink.test.ts @@ -1,6 +1,6 @@ import { ArrayBufferSink } from "bun"; import { describe, expect, it } from "bun:test"; -import { withoutAggressiveGC } from "gc"; +import { withoutAggressiveGC } from "harness"; describe("ArrayBufferSink", () => { const fixtures = [ diff --git a/test/bun.js/concat.test.js b/test/js/bun/util/concat.test.js similarity index 97% rename from test/bun.js/concat.test.js rename to test/js/bun/util/concat.test.js index 36421cab62..0cea303fe9 100644 --- a/test/bun.js/concat.test.js +++ b/test/js/bun/util/concat.test.js @@ -1,5 +1,4 @@ import { describe, it, expect } from "bun:test"; -import { gcTick } from "./gc"; import { concatArrayBuffers } from "bun"; describe("concat", () => { diff --git a/test/bun.js/empty.js b/test/js/bun/util/empty.js similarity index 100% rename from test/bun.js/empty.js rename to test/js/bun/util/empty.js diff --git a/test/bun.js/escapeHTML.test.js b/test/js/bun/util/escapeHTML.test.js similarity index 99% rename from test/bun.js/escapeHTML.test.js rename to test/js/bun/util/escapeHTML.test.js index f96849a843..bdddf4a45d 100644 --- a/test/bun.js/escapeHTML.test.js +++ b/test/js/bun/util/escapeHTML.test.js @@ -1,5 +1,4 @@ import { describe, it, expect } from "bun:test"; -import { gcTick } from "./gc"; import { escapeHTML } from "bun"; describe("escapeHTML", () => { diff --git a/test/bun.js/fileUrl.test.js b/test/js/bun/util/fileUrl.test.js similarity index 100% rename from test/bun.js/fileUrl.test.js rename to test/js/bun/util/fileUrl.test.js diff --git a/test/bun.js/filesink.test.ts b/test/js/bun/util/filesink.test.ts similarity index 100% rename from test/bun.js/filesink.test.ts rename to test/js/bun/util/filesink.test.ts diff --git a/test/bun.js/filesystem_router.test.ts b/test/js/bun/util/filesystem_router.test.ts similarity index 100% rename from test/bun.js/filesystem_router.test.ts rename to test/js/bun/util/filesystem_router.test.ts diff --git a/test/bun.js/hash.test.js b/test/js/bun/util/hash.test.js similarity index 97% rename from test/bun.js/hash.test.js rename to test/js/bun/util/hash.test.js index 0c1baaf14a..87a5a9ce32 100644 --- a/test/bun.js/hash.test.js +++ b/test/js/bun/util/hash.test.js @@ -1,7 +1,7 @@ import fs from "fs"; import { it, expect } from "bun:test"; import path from "path"; -import { gcTick } from "gc"; +import { gcTick } from "harness"; it(`Bun.hash()`, () => { gcTick(); diff --git a/test/bun.js/index-of-line.test.ts b/test/js/bun/util/index-of-line.test.ts similarity index 100% rename from test/bun.js/index-of-line.test.ts rename to test/js/bun/util/index-of-line.test.ts diff --git a/test/bun.js/inspect.test.js b/test/js/bun/util/inspect.test.js similarity index 99% rename from test/bun.js/inspect.test.js rename to test/js/bun/util/inspect.test.js index 024a976a3d..ec2fb0b45c 100644 --- a/test/bun.js/inspect.test.js +++ b/test/js/bun/util/inspect.test.js @@ -278,7 +278,7 @@ const fixture = [ return new (import.meta.require("events").EventEmitter)(); }, async () => await import("node:assert"), - async () => await import("./empty.js"), + async () => await import("../../empty.js.js"), () => import.meta.require("./empty.js"), () => new Proxy({ yolo: 1 }, {}), () => diff --git a/test/bun.js/mmap.test.js b/test/js/bun/util/mmap.test.js similarity index 97% rename from test/bun.js/mmap.test.js rename to test/js/bun/util/mmap.test.js index 2b15a4000f..4972359da5 100644 --- a/test/bun.js/mmap.test.js +++ b/test/js/bun/util/mmap.test.js @@ -1,5 +1,5 @@ import { describe, it, expect } from "bun:test"; -import { gcTick } from "./gc"; +import { gcTick } from "harness"; describe("Bun.mmap", async () => { await gcTick(); diff --git a/test/bun.js/peek.test.ts b/test/js/bun/util/peek.test.ts similarity index 100% rename from test/bun.js/peek.test.ts rename to test/js/bun/util/peek.test.ts diff --git a/test/bun.js/reportError.test.js b/test/js/bun/util/reportError.test.js similarity index 100% rename from test/bun.js/reportError.test.js rename to test/js/bun/util/reportError.test.js diff --git a/test/bun.js/sleep.js b/test/js/bun/util/sleep.js similarity index 100% rename from test/bun.js/sleep.js rename to test/js/bun/util/sleep.js diff --git a/test/bun.js/sleepSync.test.ts b/test/js/bun/util/sleepSync.test.ts similarity index 100% rename from test/bun.js/sleepSync.test.ts rename to test/js/bun/util/sleepSync.test.ts diff --git a/test/bun.js/unsafe.test.js b/test/js/bun/util/unsafe.test.js similarity index 97% rename from test/bun.js/unsafe.test.js rename to test/js/bun/util/unsafe.test.js index 8ce7598db8..38830fa36d 100644 --- a/test/bun.js/unsafe.test.js +++ b/test/js/bun/util/unsafe.test.js @@ -1,5 +1,5 @@ import { test, expect, it, describe } from "bun:test"; -import { gc } from "./gc"; +import { gc } from "harness"; it("arrayBufferToString u8", async () => { var encoder = new TextEncoder(); diff --git a/test/bun.js/which.test.ts b/test/js/bun/util/which.test.ts similarity index 100% rename from test/bun.js/which.test.ts rename to test/js/bun/util/which.test.ts diff --git a/test/bun.js/hello-wasi.wasm b/test/js/bun/wasm/hello-wasi.wasm similarity index 100% rename from test/bun.js/hello-wasi.wasm rename to test/js/bun/wasm/hello-wasi.wasm diff --git a/test/bun.js/wasi.test.js b/test/js/bun/wasm/wasi.test.js similarity index 84% rename from test/bun.js/wasi.test.js rename to test/js/bun/wasm/wasi.test.js index f6d8e76f5f..ac1d986d46 100644 --- a/test/bun.js/wasi.test.js +++ b/test/js/bun/wasm/wasi.test.js @@ -1,7 +1,6 @@ import { spawnSync } from "bun"; import { expect, it } from "bun:test"; -import { bunEnv } from "bunEnv"; -import { bunExe } from "bunExe"; +import { bunExe, bunEnv } from "harness"; it("Should support printing 'hello world'", () => { const { stdout, exitCode } = spawnSync({ diff --git a/test/bun.js/wasm-return-1-test.zig b/test/js/bun/wasm/wasm-return-1-test.zig similarity index 100% rename from test/bun.js/wasm-return-1-test.zig rename to test/js/bun/wasm/wasm-return-1-test.zig diff --git a/test/bun.js/wasm.js b/test/js/bun/wasm/wasm.js similarity index 100% rename from test/bun.js/wasm.js rename to test/js/bun/wasm/wasm.js diff --git a/test/bun.js/websocket-server.test.ts b/test/js/bun/websocket/websocket-server.test.ts similarity index 97% rename from test/bun.js/websocket-server.test.ts rename to test/js/bun/websocket/websocket-server.test.ts index 3205ff9490..b3b2e57b50 100644 --- a/test/bun.js/websocket-server.test.ts +++ b/test/js/bun/websocket/websocket-server.test.ts @@ -1,20 +1,11 @@ import { describe, expect, it } from "bun:test"; -import { gcTick } from "./gc"; +import { gcTick } from "harness"; import { serve } from "bun"; -var port = 4301; -function getPort() { - if (port > 4444) { - port = 4321; - } - - return port++; -} - describe("websocket server", () => { it("can do publish()", async done => { var server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { ws.subscribe("all"); @@ -51,7 +42,7 @@ describe("websocket server", () => { it("can do publish() with publishToSelf: false", async done => { var server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { ws.subscribe("all"); @@ -92,7 +83,7 @@ describe("websocket server", () => { it("in close() should work", async () => { var count = 0; var server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { ws.subscribe("all"); @@ -152,7 +143,7 @@ describe("websocket server", () => { var resolve; console.trace("here"); var server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) {}, message(ws, msg) {}, @@ -196,7 +187,7 @@ describe("websocket server", () => { it("headers error doesn't crash", async () => { await new Promise((resolve, reject) => { const server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { ws.close(); @@ -236,7 +227,7 @@ describe("websocket server", () => { }); it("can do hello world", async () => { const server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { server.stop(); @@ -290,7 +281,7 @@ describe("websocket server", () => { it("fetch() allows a Response object to be returned for an upgraded ServerWebSocket", () => { const server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { server.stop(); @@ -349,7 +340,7 @@ describe("websocket server", () => { it("fetch() allows a Promise object to be returned for an upgraded ServerWebSocket", () => { const server = serve({ - port: getPort(), + port: 0, websocket: { async open(ws) { server.stop(); @@ -409,7 +400,7 @@ describe("websocket server", () => { it("binaryType works", async () => { var done = false; const server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { server.stop(); @@ -471,7 +462,7 @@ describe("websocket server", () => { it("does not upgrade for non-websocket connections", async () => { await new Promise(async (resolve, reject) => { var server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { ws.send("hello world"); @@ -497,7 +488,7 @@ describe("websocket server", () => { it("does not upgrade for non-websocket servers", async () => { await new Promise(async (resolve, reject) => { const server = serve({ - port: getPort(), + port: 0, fetch(req, server) { server.stop(); expect(() => { @@ -515,7 +506,7 @@ describe("websocket server", () => { it("async can do hello world", async () => { const server = serve({ - port: getPort(), + port: 0, websocket: { async open(ws) { server.stop(true); @@ -555,7 +546,7 @@ describe("websocket server", () => { await new Promise((resolve, reject) => { var websocket; var server = serve({ - port: getPort(), + port: 0, websocket: { async open(ws) { // we don't care about the data @@ -585,7 +576,7 @@ describe("websocket server", () => { await new Promise((resolve, reject) => { var websocket; var server = serve({ - port: getPort(), + port: 0, websocket: { async open(ws) { // we don't care about the data @@ -613,7 +604,7 @@ describe("websocket server", () => { await new Promise((resolve, reject) => { var websocket; var server = serve({ - port: getPort(), + port: 0, websocket: { async open(ws) { // we don't care about the data @@ -641,7 +632,7 @@ describe("websocket server", () => { await new Promise((resolve, reject) => { var websocket; var server = serve({ - port: getPort(), + port: 0, websocket: { async open(ws) { // we don't care about the data @@ -667,7 +658,7 @@ describe("websocket server", () => { it("can do hello world corked", async () => { const server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { server.stop(); @@ -709,7 +700,7 @@ describe("websocket server", () => { it("can do some back and forth", async () => { var dataCount = 0; const server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { server.stop(); @@ -785,7 +776,7 @@ describe("websocket server", () => { var clientCounter = 0; const server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { server.stop(); @@ -846,7 +837,7 @@ describe("websocket server", () => { var serverCounter = 0; var clientCount = 0; const server = serve({ - port: getPort(), + port: 0, websocket: { open(ws) { server.stop(); diff --git a/test/bun.js/undici.test.ts b/test/js/first_party/undici/undici.test.ts similarity index 100% rename from test/bun.js/undici.test.ts rename to test/js/first_party/undici/undici.test.ts diff --git a/test/bun.js/assert-test.test.ts b/test/js/node/assert/assert-test.test.ts similarity index 100% rename from test/bun.js/assert-test.test.ts rename to test/js/node/assert/assert-test.test.ts diff --git a/test/bun.js/buffer.test.js b/test/js/node/buffer.test.js similarity index 99% rename from test/bun.js/buffer.test.js rename to test/js/node/buffer.test.js index b8fade4d23..568bf8d445 100644 --- a/test/bun.js/buffer.test.js +++ b/test/js/node/buffer.test.js @@ -1,5 +1,5 @@ import { describe, it, expect, beforeEach, afterEach, test } from "bun:test"; -import { gc } from "./gc"; +import { gc } from "harness"; const BufferModule = await import("buffer"); diff --git a/test/bun.js/child-process-stdio.test.js b/test/js/node/child_process/child-process-stdio.test.js similarity index 97% rename from test/bun.js/child-process-stdio.test.js rename to test/js/node/child_process/child-process-stdio.test.js index 43bcc771ac..d0c6d9bc75 100644 --- a/test/bun.js/child-process-stdio.test.js +++ b/test/js/node/child_process/child-process-stdio.test.js @@ -1,7 +1,6 @@ import { describe, it, expect, beforeAll } from "bun:test"; import { spawn, execSync } from "node:child_process"; -import { bunExe } from "bunExe"; -import { bunEnv } from "bunEnv"; +import { bunExe, bunEnv } from "harness"; const CHILD_PROCESS_FILE = import.meta.dir + "/spawned-child.js"; const OUT_FILE = import.meta.dir + "/stdio-test-out.txt"; diff --git a/test/bun.js/child_process-node.test.js b/test/js/node/child_process/child_process-node.test.js similarity index 99% rename from test/bun.js/child_process-node.test.js rename to test/js/node/child_process/child_process-node.test.js index f2c18c67ce..deb3bfb868 100644 --- a/test/bun.js/child_process-node.test.js +++ b/test/js/node/child_process/child_process-node.test.js @@ -1,8 +1,7 @@ import { beforeAll, describe, expect, it } from "bun:test"; import { ChildProcess, spawn, exec } from "node:child_process"; -import { throws, assert, createCallCheckCtx, createDoneDotAll } from "node-test-helpers"; +import { throws, assert, createCallCheckCtx, createDoneDotAll } from "node-harness"; import { tmpdir } from "node:os"; -import { gcTick } from "gc"; const strictEqual = (a, b) => expect(a).toStrictEqual(b); const debug = process.env.DEBUG ? console.log : () => {}; diff --git a/test/bun.js/child_process.test.ts b/test/js/node/child_process/child_process.test.ts similarity index 99% rename from test/bun.js/child_process.test.ts rename to test/js/node/child_process/child_process.test.ts index 7f2c6b383f..167cbd8b06 100644 --- a/test/bun.js/child_process.test.ts +++ b/test/js/node/child_process/child_process.test.ts @@ -1,5 +1,5 @@ import { describe, it as it_, expect as expect_ } from "bun:test"; -import { gcTick } from "gc"; +import { gcTick } from "harness"; import { ChildProcess, spawn, execFile, exec, fork, spawnSync, execFileSync, execSync } from "node:child_process"; import { tmpdir } from "node:os"; import { promisify } from "node:util"; diff --git a/test/bun.js/readFileSync.txt b/test/js/node/child_process/readFileSync.txt similarity index 100% rename from test/bun.js/readFileSync.txt rename to test/js/node/child_process/readFileSync.txt diff --git a/test/bun.js/spawned-child.js b/test/js/node/child_process/spawned-child.js similarity index 100% rename from test/bun.js/spawned-child.js rename to test/js/node/child_process/spawned-child.js diff --git a/test/bun.js/crypto-scrypt.test.js b/test/js/node/crypto/crypto-scrypt.test.js similarity index 100% rename from test/bun.js/crypto-scrypt.test.js rename to test/js/node/crypto/crypto-scrypt.test.js diff --git a/test/bun.js/crypto.test.js b/test/js/node/crypto/crypto.test.js similarity index 100% rename from test/bun.js/crypto.test.js rename to test/js/node/crypto/crypto.test.js diff --git a/test/bun.js/node-crypto.test.js b/test/js/node/crypto/node-crypto.test.js similarity index 100% rename from test/bun.js/node-crypto.test.js rename to test/js/node/crypto/node-crypto.test.js diff --git a/test/bun.js/dirname.test.js b/test/js/node/dirname.test.js similarity index 100% rename from test/bun.js/dirname.test.js rename to test/js/node/dirname.test.js diff --git a/test/bun.js/disabled-module.test.js b/test/js/node/disabled-module.test.js similarity index 100% rename from test/bun.js/disabled-module.test.js rename to test/js/node/disabled-module.test.js diff --git a/test/bun.js/dns.node.mjs b/test/js/node/dns/dns.node.mjs similarity index 100% rename from test/bun.js/dns.node.mjs rename to test/js/node/dns/dns.node.mjs diff --git a/test/bun.js/node-dns.test.js b/test/js/node/dns/node-dns.test.js similarity index 100% rename from test/bun.js/node-dns.test.js rename to test/js/node/dns/node-dns.test.js diff --git a/test/bun.js/event-emitter.test.ts b/test/js/node/events/event-emitter.test.ts similarity index 100% rename from test/bun.js/event-emitter.test.ts rename to test/js/node/events/event-emitter.test.ts diff --git a/test/bun.js/node-builtins.test.js b/test/js/node/events/node-builtins.test.js similarity index 100% rename from test/bun.js/node-builtins.test.js rename to test/js/node/events/node-builtins.test.js diff --git a/test/fixtures/export-lazy-fs-streams/export-*-from.ts b/test/js/node/fs/export-*-from.ts similarity index 100% rename from test/fixtures/export-lazy-fs-streams/export-*-from.ts rename to test/js/node/fs/export-*-from.ts diff --git a/test/fixtures/export-lazy-fs-streams/export-from.ts b/test/js/node/fs/export-from.ts similarity index 100% rename from test/fixtures/export-lazy-fs-streams/export-from.ts rename to test/js/node/fs/export-from.ts diff --git a/test/bun.js/fs-stream.js b/test/js/node/fs/fs-stream.js similarity index 100% rename from test/bun.js/fs-stream.js rename to test/js/node/fs/fs-stream.js diff --git a/test/bun.js/fs-stream.link.js b/test/js/node/fs/fs-stream.link.js similarity index 100% rename from test/bun.js/fs-stream.link.js rename to test/js/node/fs/fs-stream.link.js diff --git a/test/bun.js/fs.test.ts b/test/js/node/fs/fs.test.ts similarity index 99% rename from test/bun.js/fs.test.ts rename to test/js/node/fs/fs.test.ts index 4c847d25a4..48abef6cb1 100644 --- a/test/bun.js/fs.test.ts +++ b/test/js/node/fs/fs.test.ts @@ -1,5 +1,5 @@ import { beforeEach, describe, expect, it } from "bun:test"; -import { gc, gcTick } from "./gc"; +import { gc, gcTick } from "harness"; import fs, { closeSync, existsSync, @@ -32,11 +32,8 @@ import _promises from "node:fs/promises"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { ReadStream as ReadStream_, WriteStream as WriteStream_ } from "../fixtures/export-lazy-fs-streams/export-from"; -import { - ReadStream as ReadStreamStar_, - WriteStream as WriteStreamStar_, -} from "../fixtures/export-lazy-fs-streams/export-*-from"; +import { ReadStream as ReadStream_, WriteStream as WriteStream_ } from "./export-from.js"; +import { ReadStream as ReadStreamStar_, WriteStream as WriteStreamStar_ } from "./export-*-from.js"; const Buffer = globalThis.Buffer || Uint8Array; diff --git a/test/js/node/fs/readFileSync.txt b/test/js/node/fs/readFileSync.txt new file mode 100644 index 0000000000..ddc94b988e --- /dev/null +++ b/test/js/node/fs/readFileSync.txt @@ -0,0 +1 @@ +File read successfully \ No newline at end of file diff --git a/test/js/node/fs/test.txt b/test/js/node/fs/test.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/bun.js/writeFileSync.txt b/test/js/node/fs/writeFileSync.txt similarity index 100% rename from test/bun.js/writeFileSync.txt rename to test/js/node/fs/writeFileSync.txt diff --git a/test/bun.js/node-test-helpers.test.js b/test/js/node/harness.test.js similarity index 100% rename from test/bun.js/node-test-helpers.test.js rename to test/js/node/harness.test.js diff --git a/test/bun.js/node-test-helpers.ts b/test/js/node/harness.ts similarity index 99% rename from test/bun.js/node-test-helpers.ts rename to test/js/node/harness.ts index 0eaa7d07b4..227009a642 100644 --- a/test/bun.js/node-test-helpers.ts +++ b/test/js/node/harness.ts @@ -1,6 +1,5 @@ import { expect as expect_ } from "bun:test"; -// @ts-ignore -import { gcTick } from "gc"; +import { gcTick } from "harness"; import assertNode from "node:assert"; type DoneCb = (err?: Error) => any; diff --git a/test/bun.js/node-http.test.ts b/test/js/node/http/node-http.fixme.ts similarity index 94% rename from test/bun.js/node-http.test.ts rename to test/js/node/http/node-http.fixme.ts index 619d8cb352..d47002a6ff 100644 --- a/test/bun.js/node-http.test.ts +++ b/test/js/node/http/node-http.fixme.ts @@ -1,6 +1,19 @@ import { describe, expect, it, beforeAll, afterAll } from "bun:test"; import { createServer, request, get, Agent, globalAgent, Server } from "node:http"; -import { createDoneDotAll } from "node-test-helpers"; +import { createDoneDotAll } from "node-harness"; + +function listen(server: any): Promise { + return new Promise((resolve, reject) => { + server.listen({ port: 0 }, (err, hostname, port) => { + if (err) { + reject(err); + } else { + resolve(new URL(`http://${hostname}:${port}`)); + } + }); + setTimeout(() => reject("Timed out"), 5000); + }); +} describe("node:http", () => { describe("createServer", async () => { @@ -10,9 +23,8 @@ describe("node:http", () => { res.writeHead(200, { "Content-Type": "text/plain" }); res.end("Hello World"); }); - server.listen(8123); - - const res = await fetch("http://localhost:8123/hello?world"); + const url = await listen(server); + const res = await fetch(new URL("/hello?world", url)); expect(await res.text()).toBe("Hello World"); server.close(); }); @@ -32,9 +44,8 @@ describe("node:http", () => { res.end(); }); }); - server.listen(8124); - - const res = await fetch("http://localhost:8124", { + const url = await listen(server); + const res = await fetch(url, { method: "POST", body: bodyBlob, }); @@ -59,9 +70,8 @@ describe("node:http", () => { res.end(); }); }); - server.listen(8125); - - const res = await fetch("http://localhost:8125", { + const url = await listen(server); + const res = await fetch(url, { method: "POST", body: bodyBlob, }); @@ -73,7 +83,7 @@ describe("node:http", () => { it("listen should return server", async () => { const server = createServer(); - const listenResponse = server.listen(8129); + const listenResponse = server.listen(0); expect(listenResponse instanceof Server).toBe(true); expect(listenResponse).toBe(server); listenResponse.close(); @@ -464,24 +474,25 @@ describe("node:http", () => { done(); }); - server.listen({ signal, port: 8130 }); + server.listen({ signal, port: 0 }); }); }); describe("get", () => { let server; - beforeAll(() => { + let url; + beforeAll(async () => { server = createServer((req, res) => { res.writeHead(200, { "Content-Type": "text/plain" }); res.end("Hello World"); }); - server.listen(8127); + url = await listen(server); }); afterAll(() => { server.close(); }); it("should make a standard GET request, like request", done => { - get("http://127.0.0.1:8127", res => { + get(url, res => { let data = ""; res.setEncoding("utf8"); res.on("data", chunk => { @@ -506,12 +517,12 @@ describe("node:http", () => { res.writeHead(200, { "Content-Type": "text/plain" }); res.end("Hello World"); }); - server.listen(8128, () => { + server.listen({ port: 0 }, (_, host, port) => { // Setup request after server is listening dummyReq = request( { - host: "localhost", - port: 8128, + host, + port, agent: dummyAgent, }, res => {}, @@ -570,7 +581,7 @@ describe("node:http", () => { server.close(); }); it("should attempt to make a standard GET request and abort", done => { - get(`http://127.0.0.1:${server_port}`, { signal: AbortSignal.timeout(5) }, res => { + get(`http://${server_host}:${server_port}`, { signal: AbortSignal.timeout(5) }, res => { let data = ""; res.setEncoding("utf8"); res.on("data", chunk => { diff --git a/test/bun.js/node-module-module.test.js b/test/js/node/module/node-module-module.test.js similarity index 100% rename from test/bun.js/node-module-module.test.js rename to test/js/node/module/node-module-module.test.js diff --git a/test/bun.js/socket/node-net.test.ts b/test/js/node/net/node-net.test.ts similarity index 100% rename from test/bun.js/socket/node-net.test.ts rename to test/js/node/net/node-net.test.ts diff --git a/test/bun.js/os.test.js b/test/js/node/os/os.test.js similarity index 100% rename from test/bun.js/os.test.js rename to test/js/node/os/os.test.js diff --git a/test/bun.js/path.test.js b/test/js/node/path/path.test.js similarity index 100% rename from test/bun.js/path.test.js rename to test/js/node/path/path.test.js diff --git a/test/bun.js/print-process-args.js b/test/js/node/process/print-process-args.js similarity index 100% rename from test/bun.js/print-process-args.js rename to test/js/node/process/print-process-args.js diff --git a/test/bun.js/process-args.test.js b/test/js/node/process/process-args.test.js similarity index 97% rename from test/bun.js/process-args.test.js rename to test/js/node/process/process-args.test.js index a2c79616f5..4da3a5381f 100644 --- a/test/bun.js/process-args.test.js +++ b/test/js/node/process/process-args.test.js @@ -1,6 +1,6 @@ import { spawn } from "bun"; import { test, expect } from "bun:test"; -import { bunExe } from "./bunExe"; +import { bunExe } from "harness"; test("args exclude run", async () => { const arg0 = process.argv[0]; diff --git a/test/bun.js/process-nexttick.js b/test/js/node/process/process-nexttick.js similarity index 100% rename from test/bun.js/process-nexttick.js rename to test/js/node/process/process-nexttick.js diff --git a/test/bun.js/process-nexttick.test.js b/test/js/node/process/process-nexttick.test.js similarity index 100% rename from test/bun.js/process-nexttick.test.js rename to test/js/node/process/process-nexttick.test.js diff --git a/test/bun.js/process-stdin-echo.js b/test/js/node/process/process-stdin-echo.js similarity index 100% rename from test/bun.js/process-stdin-echo.js rename to test/js/node/process/process-stdin-echo.js diff --git a/test/bun.js/process-stdio.test.ts b/test/js/node/process/process-stdio.test.ts similarity index 99% rename from test/bun.js/process-stdio.test.ts rename to test/js/node/process/process-stdio.test.ts index 6054eeeebb..463ab5fda3 100644 --- a/test/bun.js/process-stdio.test.ts +++ b/test/js/node/process/process-stdio.test.ts @@ -1,6 +1,6 @@ import { spawn, spawnSync } from "bun"; import { describe, expect, it, test } from "bun:test"; -import { bunExe } from "bunExe"; +import { bunExe } from "harness"; import { isatty } from "tty"; test("process.stdin", () => { diff --git a/test/bun.js/process.test.js b/test/js/node/process/process.test.js similarity index 96% rename from test/bun.js/process.test.js rename to test/js/node/process/process.test.js index 8cc3e6b87e..59f54c53f9 100644 --- a/test/bun.js/process.test.js +++ b/test/js/node/process/process.test.js @@ -1,6 +1,6 @@ import { resolveSync, which } from "bun"; import { describe, expect, it } from "bun:test"; -import { readFileSync, realpathSync } from "fs"; +import { existsSync, readFileSync, realpathSync } from "fs"; import { basename } from "path"; it("process", () => { @@ -120,7 +120,8 @@ it("process.umask()", () => { expect(process.umask(orig)).toBe(777); }); -it("process.versions", () => { +const versions = existsSync(import.meta.dir + "/../../src/generated_versions_list.zig"); +(versions ? it : it.skip)("process.versions", () => { // Generate a list of all the versions in the versions object // example: // pub const boringssl = "b275c5ce1c88bc06f5a967026d3c0ce1df2be815"; diff --git a/test/bun.js/readline.node.test.ts b/test/js/node/readline/readline.node.test.ts similarity index 99% rename from test/bun.js/readline.node.test.ts rename to test/js/node/readline/readline.node.test.ts index 4a6c4be8c4..7dfa51ac8d 100644 --- a/test/bun.js/readline.node.test.ts +++ b/test/js/node/readline/readline.node.test.ts @@ -2,7 +2,7 @@ import { beforeEach, describe, it } from "bun:test"; import readline from "node:readline"; import { Writable, PassThrough } from "node:stream"; import { EventEmitter } from "node:events"; -import { createDoneDotAll, createCallCheckCtx, assert } from "./node-test-helpers"; +import { createDoneDotAll, createCallCheckCtx, assert } from "node-harness"; var { CSI, diff --git a/test/bun.js/readline_promises.node.test.ts b/test/js/node/readline/readline_promises.node.test.ts similarity index 94% rename from test/bun.js/readline_promises.node.test.ts rename to test/js/node/readline/readline_promises.node.test.ts index 93093aecd0..c75d254ca0 100644 --- a/test/bun.js/readline_promises.node.test.ts +++ b/test/js/node/readline/readline_promises.node.test.ts @@ -1,7 +1,7 @@ import { describe, it } from "bun:test"; import readlinePromises from "node:readline/promises"; import { EventEmitter } from "node:events"; -import { createDoneDotAll, createCallCheckCtx, assert } from "./node-test-helpers"; +import { createDoneDotAll, createCallCheckCtx, assert } from "node-harness"; // ---------------------------------------------------------------------------- // Helpers diff --git a/test/bun.js/bufferlist.test.ts b/test/js/node/stream/bufferlist.test.ts similarity index 100% rename from test/bun.js/bufferlist.test.ts rename to test/js/node/stream/bufferlist.test.ts diff --git a/test/bun.js/node-stream-uint8array.test.ts b/test/js/node/stream/node-stream-uint8array.test.ts similarity index 100% rename from test/bun.js/node-stream-uint8array.test.ts rename to test/js/node/stream/node-stream-uint8array.test.ts diff --git a/test/bun.js/node-stream.test.js b/test/js/node/stream/node-stream.test.js similarity index 100% rename from test/bun.js/node-stream.test.js rename to test/js/node/stream/node-stream.test.js diff --git a/test/bun.js/string-decoder.test.js b/test/js/node/string_decoder/string-decoder.test.js similarity index 99% rename from test/bun.js/string-decoder.test.js rename to test/js/node/string_decoder/string-decoder.test.js index 4bc9d7e8bb..f373266782 100644 --- a/test/bun.js/string-decoder.test.js +++ b/test/js/node/string_decoder/string-decoder.test.js @@ -1,5 +1,5 @@ import { describe, expect, it } from "bun:test"; -import { withoutAggressiveGC } from "gc"; +import { withoutAggressiveGC } from "harness"; const RealStringDecoder = require("string_decoder").StringDecoder; diff --git a/test/bun.js/node-timers.test.ts b/test/js/node/timers/node-timers.test.ts similarity index 100% rename from test/bun.js/node-timers.test.ts rename to test/js/node/timers/node-timers.test.ts diff --git a/test/bun.js/test-util-types.test.js b/test/js/node/util/test-util-types.test.js similarity index 100% rename from test/bun.js/test-util-types.test.js rename to test/js/node/util/test-util-types.test.js diff --git a/test/bun.js/util/util-promisify.test.js b/test/js/node/util/util-promisify.test.js similarity index 100% rename from test/bun.js/util/util-promisify.test.js rename to test/js/node/util/util-promisify.test.js diff --git a/test/bun.js/util/util.test.js b/test/js/node/util/util.test.js similarity index 100% rename from test/bun.js/util/util.test.js rename to test/js/node/util/util.test.js diff --git a/test/bun.js/capture-stack-trace.test.js b/test/js/node/v8/capture-stack-trace.test.js similarity index 100% rename from test/bun.js/capture-stack-trace.test.js rename to test/js/node/v8/capture-stack-trace.test.js diff --git a/test/js/node/zlib/fixture.html.gz b/test/js/node/zlib/fixture.html.gz new file mode 100644 index 0000000000000000000000000000000000000000..0bb85d4cbd6c73a189d1bf1ccb2093866940ef69 GIT binary patch literal 16139 zcmbW8(^n-98-;U|ZQHgzO_OcgwrjF$vTN#O+qP}n?u1j{?{D~S-nI7ayVkzg&sq;j z%#RUsM%q2Sq_ z#x1>HZjeyo1IeuEc{`4~#;^DhxneXqT3#Rn~ ze)OuUzJ=Rg`<0Jk%7%bw(nB0zhmu`za%qS)-Ak)ht!|X1soFxIDh~EU>sn<+ReHGf zDDC*1y;Q`At$GV!*X&q5^)K(6vqX7^O=SpnE2Wrf4;z`1?4lNZ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M&ZQ>p#(GS3RG(GLP~O*GHHlrrIEJjWpizTG_VoMLHR3Hq;xM z{skzUyi{Izr5tj*is(P2`U1LVGI${8R|jKQuOb8qu5SS;Q0@oMF3ooC%gt<~?|lN# zzHfxZpCD8NpKg#Zc~TImvlP6>T~LL6L|5Vr>tognUs~U)zdnes9yKi=EAHJx7UV8s zB_;c#K`$I_-K&L2L(?x_Ms(Ku>ZDF~uhHe$H(b2qu-tEn=eLYjshUTNJ*8;KV~c&o z!GwnJXxD1}a81CY&^u9^kB~qu*WgTZioVKjkG}+FAc7zgidHae7X_Aa9rIFPiPZ%H zmSxS37yI2#FX%8B@byv?>>E+mW%*Qb6_?UcY7(465;)ZtDiQgU#L3eD3a=C1U3?1r z$?3p9iA@y$?#?}UI~QlVyN8m!{a_#u1=^uKnwu>b@iMz7lu2FPl#c2jRgDnTFXzwoRl_|QcSQK~pd|E@kq2tZHv1fhXyxyF5;dR# z+_*CqIwlqPn}ABqkz8E>a?~T5Nxp<;4c$rfdrD|+=^2JEK2#9Tmk@9&A7jYjPiM59 z4D!Q|md{NB%rb^UD~P8w5mR7KlIndgjmZ`P!tpjFHE7{9v1m6&8V{lsr4X&?itk^1 zR-V+oQI($ul*G`i5hmH0@>n6>>6JJzsGzb^R=>o^-u--y8qQX%nQq&=y3_bTDZPj+ zqoGk2$It+obw_Z67P}$oD@np?4*>>Z)WvwNGr?@U7KB-f0{|xExb(LtO|Jg48r$3y W5lu8>Y1$O|6p`Ic^4Ep|2m2p#g6O3H literal 0 HcmV?d00001 diff --git a/test/bun.js/zlib.test.js b/test/js/node/zlib/zlib.test.js similarity index 100% rename from test/bun.js/zlib.test.js rename to test/js/node/zlib/zlib.test.js diff --git a/test/bun.js/third-party/body-parser-test/bun.lockb b/test/js/third_party/body-parser/bun.lockb similarity index 100% rename from test/bun.js/third-party/body-parser-test/bun.lockb rename to test/js/third_party/body-parser/bun.lockb diff --git a/test/bun.js/third-party/body-parser-test/express-body-parser-test.test.ts b/test/js/third_party/body-parser/express-body-parser-test.test.ts similarity index 100% rename from test/bun.js/third-party/body-parser-test/express-body-parser-test.test.ts rename to test/js/third_party/body-parser/express-body-parser-test.test.ts diff --git a/test/bun.js/third-party/body-parser-test/package.json b/test/js/third_party/body-parser/package.json similarity index 100% rename from test/bun.js/third-party/body-parser-test/package.json rename to test/js/third_party/body-parser/package.json diff --git a/test/js/third_party/esbuild/bun.lockb b/test/js/third_party/esbuild/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..f46c6aa5dae1649e0176cf623fe7138146213cb9 GIT binary patch literal 8425 zcmeI1dsvLy8o;M~U8M`s?A=u^NxDqwDpARGOXRMorkPCUl9}nsIi?$l_9;>>9fWSD zwxTGzt*zt|LQ07wY*Z=HXGv*ZW)VTHm^TZ{x;V zhVr99%iK~Pa=^PJ`&E?-ye8r@WLw1 z^V#Q011iIk<~9a)W*y$#Mh*5gTxA3*fkYMyk}@upa4Ep$;ZgVlA!xjSPzE!Q)FDSA zjU&r{d)cfgA(sJK}j`Aay`q4KIHOT7=vuKtgUk zkg&a9@q8YT&^`@FST7n#Z6H~=eg&>~$MZmllIFPS?%_(WO6`8Qb~dm z>b1-L0>jP6mhG;5l9D@0XU^N*)4Ik5C+$y2zzWu{({hS38H)W6BxV$s;G($nAKXS(mA)Up=W~QT}X(FL#DX#*w_g2lpsXxOFduD9KXU@b9`I#ehW_27q9(KvfZU4GbMGg6bx>i5ecTiW82L~xjuGrC*xZE_; z)7Q$mtmKtGyPZ`fSNt||q)_qL$ycTW)CYQjNqIq+`pPy(rRF};r3n;M`_mVC`?hrc zcJVZACU3Jr_oeg|%gF{Wx3KFhUeiF&;jDmZIQTh$ae~iU;0N=6CL#Ox;Qe^WU_TRp z=Ez{b4cO0SEjDJ3` zm!w>@B<4z^v17xO4@@4<^6Spf z=-Di!x{WXlNQzbOI+s>pqTb(>%k7ANk^O2;{QJ(eKgH}hP}S<$-e0>Q-pBGp^n{I9 zq8q}1kASBv01}Lq<&Y`DjhJJotevhUAp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jxhn9-{N)9=JFOCK$3NjzR+4eCiqG-&fTzB`>txFG)=FcbjTzGx|l)bV^@WJA% z+_w}F7kCS}@GgWB=Ef}x7d~7zZO`Mu#Wv9mNmq5#lWsW3H{6?6c_lLccsA>Gam$nu zFK@qYb|%|-kS!EcYPg|OpS2_wKJ5#e*Nx^G7CWfwt4eLn;AY8+NZen zrYf(y+M-=ry)UiItNT%ZF8LyJB~#UvdoE@dYWwrK&TJOSNFId3=8+(*lL*ES7RbEu8A3o!j12$)-<8f!b> zPzNxucEp%aJ|9@L&QSbMp12sh10wKFfFf;}oRtN|-hx6QtpFO}zW~MJBpMcOgQ9g3 zO*GH|_XH@OC()z<4Hy9diug%1@V*1vK`}vz21Pqj)KH?S2R2|V1t_j4(L4bf*dG*m zlxR>)6~!hc8WeR!(MyR2#br@^Q=&nUTNDA6Xi#hy#YiO@6#Yd}REY+~hf$nWqCpX4 z6p58+P>dPHY9$&Jg+|d_i3Y`~QM^~8L6K|}5te9BtQ*CQC7L#T1|s?Ss^`&IVKlCV zM+Be7W&1O|`CJA&$i;{vnWPTHB-O-2@r#YX>jMd_Eij)czc-ypqJIR4WAW?x{1Bd# zr6rdZ#NhF{krwO_RxrZ3Y|Tc{_H?5hY@J*&t?6mGP|i? zl}1RF1^RQt8Ek0$b)j@UI@tOGc%oLMDxy;9noI^eG~zRFh!QDFaT&wk#+qtBUzPG~9IYb0u$K0kP2cz$Rwe33}@q@iKZA`x?jv`7e3qGJH_t=>rO$^avk8!8BO z455b9HT { const { exitCode, stderr, stdout } = spawnSync([bunExe(), import.meta.dir + "/esbuild-test.js"], { diff --git a/test/bun.js/esbuild-test.js b/test/js/third_party/esbuild/esbuild-test.js similarity index 100% rename from test/bun.js/esbuild-test.js rename to test/js/third_party/esbuild/esbuild-test.js diff --git a/test/js/third_party/esbuild/package.json b/test/js/third_party/esbuild/package.json new file mode 100644 index 0000000000..ad6bc55f6e --- /dev/null +++ b/test/js/third_party/esbuild/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "dependencies": { + "esbuild": "^0.17.11" + } +} \ No newline at end of file diff --git a/test/bun.js/third-party/napi_create_external/bun.lockb b/test/js/third_party/napi_create_external/bun.lockb similarity index 100% rename from test/bun.js/third-party/napi_create_external/bun.lockb rename to test/js/third_party/napi_create_external/bun.lockb diff --git a/test/bun.js/third-party/napi_create_external/napi-create-external.test.ts b/test/js/third_party/napi_create_external/napi-create-external.test.ts similarity index 99% rename from test/bun.js/third-party/napi_create_external/napi-create-external.test.ts rename to test/js/third_party/napi_create_external/napi-create-external.test.ts index ca7e50b991..c3fe5ad65b 100644 --- a/test/bun.js/third-party/napi_create_external/napi-create-external.test.ts +++ b/test/js/third_party/napi_create_external/napi-create-external.test.ts @@ -1,5 +1,5 @@ import { test, it, describe, expect } from "bun:test"; -import { withoutAggressiveGC } from "gc"; +import { withoutAggressiveGC } from "harness"; import * as _ from "lodash"; function rebase(str, inBase, outBase) { diff --git a/test/bun.js/third-party/napi_create_external/package.json b/test/js/third_party/napi_create_external/package.json similarity index 93% rename from test/bun.js/third-party/napi_create_external/package.json rename to test/js/third_party/napi_create_external/package.json index 82b0ef58d6..659b279b21 100644 --- a/test/bun.js/third-party/napi_create_external/package.json +++ b/test/js/third_party/napi_create_external/package.json @@ -1,5 +1,6 @@ { "name": "napi-create-external-test", + "type": "module", "version": "1.0.0", "description": "Test for napi_create_external", "dependencies": { diff --git a/test/bun.js/react-dom-server.bun.cjs b/test/js/third_party/react-dom/react-dom-server.bun.cjs similarity index 100% rename from test/bun.js/react-dom-server.bun.cjs rename to test/js/third_party/react-dom/react-dom-server.bun.cjs diff --git a/test/bun.js/react-dom.test.tsx b/test/js/third_party/react-dom/react-dom.test.tsx similarity index 99% rename from test/bun.js/react-dom.test.tsx rename to test/js/third_party/react-dom/react-dom.test.tsx index b484982e06..2f1309fb8a 100644 --- a/test/bun.js/react-dom.test.tsx +++ b/test/js/third_party/react-dom/react-dom.test.tsx @@ -9,7 +9,7 @@ import { import { heapStats } from "bun:jsc"; import { describe, expect, it } from "bun:test"; import { renderToReadableStream as renderToReadableStreamBrowser } from "react-dom/server.browser"; -import { gc } from "./gc"; +import { gc } from "harness"; import { renderToReadableStream as renderToReadableStreamBun } from "./react-dom-server.bun.cjs"; import React from "react"; diff --git a/test/bun.js/bun-loader-svelte/bun-loader-svelte.ts b/test/js/third_party/svelte/bun-loader-svelte.ts similarity index 100% rename from test/bun.js/bun-loader-svelte/bun-loader-svelte.ts rename to test/js/third_party/svelte/bun-loader-svelte.ts diff --git a/test/js/third_party/svelte/hello.svelte b/test/js/third_party/svelte/hello.svelte new file mode 100644 index 0000000000..05dac42940 --- /dev/null +++ b/test/js/third_party/svelte/hello.svelte @@ -0,0 +1,5 @@ + + +

Hello {name}!

diff --git a/test/bun.js/bun-loader-svelte/package.json b/test/js/third_party/svelte/package.json similarity index 100% rename from test/bun.js/bun-loader-svelte/package.json rename to test/js/third_party/svelte/package.json diff --git a/test/js/third_party/svelte/svelte.test.ts b/test/js/third_party/svelte/svelte.test.ts new file mode 100644 index 0000000000..44e36cce27 --- /dev/null +++ b/test/js/third_party/svelte/svelte.test.ts @@ -0,0 +1,21 @@ +import { describe, expect, it } from "bun:test"; +import "./bun-loader-svelte"; + +describe("require", () => { + it("SSRs `

Hello world!

` with Svelte", () => { + const { default: App } = require("./hello.svelte"); + const { html } = App.render(); + + expect(html).toBe("

Hello world!

"); + }); +}); + +describe("dynamic import", () => { + it("SSRs `

Hello world!

` with Svelte", async () => { + const { default: App }: any = await import("./hello.svelte"); + + const { html } = App.render(); + + expect(html).toBe("

Hello world!

"); + }); +}); diff --git a/test/bun.js/abort-signal-timeout.test.js b/test/js/web/abort/abort-signal-timeout.test.js similarity index 100% rename from test/bun.js/abort-signal-timeout.test.js rename to test/js/web/abort/abort-signal-timeout.test.js diff --git a/test/bun.js/console/console-log.expected.txt b/test/js/web/console/console-log.expected.txt similarity index 100% rename from test/bun.js/console/console-log.expected.txt rename to test/js/web/console/console-log.expected.txt diff --git a/test/bun.js/console/console-log.js b/test/js/web/console/console-log.js similarity index 100% rename from test/bun.js/console/console-log.js rename to test/js/web/console/console-log.js diff --git a/test/bun.js/console/console-log.test.ts b/test/js/web/console/console-log.test.ts similarity index 94% rename from test/bun.js/console/console-log.test.ts rename to test/js/web/console/console-log.test.ts index 7fd9c79e57..98c8370def 100644 --- a/test/bun.js/console/console-log.test.ts +++ b/test/js/web/console/console-log.test.ts @@ -1,6 +1,6 @@ import { file, spawn } from "bun"; import { expect, it } from "bun:test"; -import { bunExe } from "bunExe"; +import { bunExe } from "harness"; it("should log to console correctly", async () => { const { stdout, stderr, exited } = spawn({ diff --git a/test/bun.js/web-crypto.test.ts b/test/js/web/crypto/web-crypto.test.ts similarity index 100% rename from test/bun.js/web-crypto.test.ts rename to test/js/web/crypto/web-crypto.test.ts diff --git a/test/bun.js/text-decoder.test.js b/test/js/web/encoding/text-decoder.test.js similarity index 99% rename from test/bun.js/text-decoder.test.js rename to test/js/web/encoding/text-decoder.test.js index da04974641..abd4c2a72f 100644 --- a/test/bun.js/text-decoder.test.js +++ b/test/js/web/encoding/text-decoder.test.js @@ -1,5 +1,5 @@ import { expect, it, describe } from "bun:test"; -import { gc as gcTrace, withoutAggressiveGC } from "./gc"; +import { gc as gcTrace, withoutAggressiveGC } from "harness"; const getByteLength = str => { // returns the byte length of an utf8 string diff --git a/test/bun.js/text-encoder.test.js b/test/js/web/encoding/text-encoder.test.js similarity index 99% rename from test/bun.js/text-encoder.test.js rename to test/js/web/encoding/text-encoder.test.js index a18c22618f..3d271026da 100644 --- a/test/bun.js/text-encoder.test.js +++ b/test/js/web/encoding/text-encoder.test.js @@ -1,5 +1,5 @@ import { expect, it, describe } from "bun:test"; -import { gc as gcTrace, withoutAggressiveGC } from "./gc"; +import { gc as gcTrace, withoutAggressiveGC } from "harness"; const getByteLength = str => { // returns the byte length of an utf8 string diff --git a/test/bun.js/utf8-encoding-fixture.bin b/test/js/web/encoding/utf8-encoding-fixture.bin similarity index 100% rename from test/bun.js/utf8-encoding-fixture.bin rename to test/js/web/encoding/utf8-encoding-fixture.bin diff --git a/test/bun.js/body-mixin-errors.test.ts b/test/js/web/fetch/body-mixin-errors.test.ts similarity index 100% rename from test/bun.js/body-mixin-errors.test.ts rename to test/js/web/fetch/body-mixin-errors.test.ts diff --git a/test/bun.js/body-stream.test.ts b/test/js/web/fetch/body-stream.test.ts similarity index 100% rename from test/bun.js/body-stream.test.ts rename to test/js/web/fetch/body-stream.test.ts diff --git a/test/bun.js/fetch-gzip.test.ts b/test/js/web/fetch/fetch-gzip.test.ts similarity index 99% rename from test/bun.js/fetch-gzip.test.ts rename to test/js/web/fetch/fetch-gzip.test.ts index eee8413758..01eedc54ac 100644 --- a/test/bun.js/fetch-gzip.test.ts +++ b/test/js/web/fetch/fetch-gzip.test.ts @@ -1,7 +1,7 @@ import { concatArrayBuffers } from "bun"; import { it, describe, expect } from "bun:test"; import fs from "fs"; -import { gc, gcTick } from "./gc"; +import { gc, gcTick } from "harness"; it("fetch() with a buffered gzip response works (one chunk)", async () => { var server = Bun.serve({ diff --git a/test/js/web/fetch/fetch.js.txt b/test/js/web/fetch/fetch.js.txt new file mode 100644 index 0000000000..5a9b52fcf1 --- /dev/null +++ b/test/js/web/fetch/fetch.js.txt @@ -0,0 +1,46 @@ + + + + Example Domain + + + + + + + + +
+

Example Domain

+

This domain is for use in illustrative examples in documents. You may use this + domain in literature without prior coordination or asking for permission.

+

More information...

+
+ + diff --git a/test/bun.js/fetch.test.ts b/test/js/web/fetch/fetch.test.ts similarity index 99% rename from test/bun.js/fetch.test.ts rename to test/js/web/fetch/fetch.test.ts index f5f264dd75..1185dbd55f 100644 --- a/test/bun.js/fetch.test.ts +++ b/test/js/web/fetch/fetch.test.ts @@ -4,7 +4,7 @@ import { chmodSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSy import { mkfifo } from "mkfifo"; import { tmpdir } from "os"; import { join } from "path"; -import { gc, withoutAggressiveGC } from "./gc"; +import { gc, withoutAggressiveGC } from "harness"; const tmp_dir = mkdtempSync(join(realpathSync(tmpdir()), "fetch.test")); diff --git a/test/bun.js/fetch_headers.test.js b/test/js/web/fetch/fetch_headers.test.js similarity index 100% rename from test/bun.js/fetch_headers.test.js rename to test/js/web/fetch/fetch_headers.test.js diff --git a/test/bun.js/fixture.html b/test/js/web/fetch/fixture.html similarity index 100% rename from test/bun.js/fixture.html rename to test/js/web/fetch/fixture.html diff --git a/test/js/web/fetch/fixture.html.gz b/test/js/web/fetch/fixture.html.gz new file mode 100644 index 0000000000000000000000000000000000000000..0bb85d4cbd6c73a189d1bf1ccb2093866940ef69 GIT binary patch literal 16139 zcmbW8(^n-98-;U|ZQHgzO_OcgwrjF$vTN#O+qP}n?u1j{?{D~S-nI7ayVkzg&sq;j z%#RUsM%q2Sq_ z#x1>HZjeyo1IeuEc{`4~#;^DhxneXqT3#Rn~ ze)OuUzJ=Rg`<0Jk%7%bw(nB0zhmu`za%qS)-Ak)ht!|X1soFxIDh~EU>sn<+ReHGf zDDC*1y;Q`At$GV!*X&q5^)K(6vqX7^O=SpnE2Wrf4;z`1?4lNZX*UR)gWAw;c?FZC zZQwUREe5@;-e~=Afwi-G0zrrP@*mAYip-0J(y3I3N`zyuG_ZF6(PG1t84B2{F&_HJ z>?*Azy5%|38-J0!hSDvi7P_+)mEqb7hxIuIsx$VN!`qkqu;B-uicWp{nJ@`Q4ygvF zi|?=6@3W#sYaF%vxTQKNWFb#8~BvRk9wHR~++@$6VCpfarAe7HdIaYb877c{H{j1Pq zqlq5a{irY_hwmb|6Un!j4piz1J~0=9E0X+;mxcFaIS6g^6;A75Cx)mJVYmUOs58C*SDa~jc0#||0s%Gp zaG>deaYkDAb1b5iKO53u>DR?qQJI(C5|s5<*t=v*lc;4N!j?9jS19%Z{9&&#SS^j0 zZO(KQ-91o4PnAZM0Dp`wGetWvG^~(dMFosQ2xcds&;)B4v#f}Wp`L)=1Ep=xa#Slb zS)5r_u~dv%y$nV$#;}qfb(Ed6AA9eVxT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|E@kq2tZHv1fhXyxyF5;dR# z+_*CqIwlqPn}ABqkz8E>a?~T5Nxp<;4c$rfdrD|+=^2JEK2#9Tmk@9&A7jYjPiM59 z4D!Q|md{NB%rb^UD~P8w5mR7KlIndgjmZ`P!tpjFHE7{9v1m6&8V{lsr4X&?itk^1 zR-V+oQI($ul*G`i5hmH0@>n6>>6JJzsGzb^R=>o^-u--y8qQX%nQq&=y3_bTDZPj+ zqoGk2$It+obw_Z67P}$oD@np?4*>>Z)WvwNGr?@U7KB-f0{|xExb(LtO|Jg48r$3y W5lu8>Y1$O|6p`Ic^4Ep|2m2p#g6O3H literal 0 HcmV?d00001 diff --git a/test/bun.js/FormData.test.ts b/test/js/web/html/FormData.test.ts similarity index 99% rename from test/bun.js/FormData.test.ts rename to test/js/web/html/FormData.test.ts index 25c0d5d549..9d0db43611 100644 --- a/test/bun.js/FormData.test.ts +++ b/test/js/web/html/FormData.test.ts @@ -1,7 +1,7 @@ import { afterAll, beforeAll, describe, expect, it, test } from "bun:test"; import fs, { chmodSync, unlinkSync } from "fs"; import { mkfifo } from "mkfifo"; -import { gc, withoutAggressiveGC } from "./gc"; +import { gc, withoutAggressiveGC } from "../../gc"; describe("FormData", () => { it("should be able to append a string", () => { diff --git a/test/bun.js/form-data-fixture.txt b/test/js/web/html/form-data-fixture.txt similarity index 100% rename from test/bun.js/form-data-fixture.txt rename to test/js/web/html/form-data-fixture.txt diff --git a/test/js/web/streams/bun-streams-test-fifo.sh b/test/js/web/streams/bun-streams-test-fifo.sh new file mode 100644 index 0000000000..57650ba1d7 --- /dev/null +++ b/test/js/web/streams/bun-streams-test-fifo.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +echoerr() { echo "$@" 1>&2; } + +echoerr "bun-streams-test-fifo.sh: starting" +echo -e "$FIFO_TEST" >>${@: -1} +echoerr "bun-streams-test-fifo.sh: ending" +exit 0 diff --git a/test/js/web/streams/fetch.js.txt b/test/js/web/streams/fetch.js.txt new file mode 100644 index 0000000000..5a9b52fcf1 --- /dev/null +++ b/test/js/web/streams/fetch.js.txt @@ -0,0 +1,46 @@ + + + + Example Domain + + + + + + + + +
+

Example Domain

+

This domain is for use in illustrative examples in documents. You may use this + domain in literature without prior coordination or asking for permission.

+

More information...

+
+ + diff --git a/test/bun.js/streams.test.js b/test/js/web/streams/streams.test.js similarity index 99% rename from test/bun.js/streams.test.js rename to test/js/web/streams/streams.test.js index 7ae49db40d..c4af85e4f5 100644 --- a/test/bun.js/streams.test.js +++ b/test/js/web/streams/streams.test.js @@ -4,7 +4,7 @@ import { mkfifo } from "mkfifo"; import { realpathSync, unlinkSync, writeFileSync } from "node:fs"; import { join } from "node:path"; import { tmpdir } from "os"; -import { gc } from "./gc"; +import { gc } from "harness"; beforeEach(() => gc()); afterEach(() => gc()); diff --git a/test/bun.js/microtask.test.js b/test/js/web/timers/microtask.test.js similarity index 100% rename from test/bun.js/microtask.test.js rename to test/js/web/timers/microtask.test.js diff --git a/test/bun.js/performance.test.js b/test/js/web/timers/performance.test.js similarity index 100% rename from test/bun.js/performance.test.js rename to test/js/web/timers/performance.test.js diff --git a/test/bun.js/setImmediate.test.js b/test/js/web/timers/setImmediate.test.js similarity index 100% rename from test/bun.js/setImmediate.test.js rename to test/js/web/timers/setImmediate.test.js diff --git a/test/bun.js/setInterval.test.js b/test/js/web/timers/setInterval.test.js similarity index 100% rename from test/bun.js/setInterval.test.js rename to test/js/web/timers/setInterval.test.js diff --git a/test/bun.js/setTimeout.test.js b/test/js/web/timers/setTimeout.test.js similarity index 100% rename from test/bun.js/setTimeout.test.js rename to test/js/web/timers/setTimeout.test.js diff --git a/test/bun.js/url.test.ts b/test/js/web/url/url.test.ts similarity index 100% rename from test/bun.js/url.test.ts rename to test/js/web/url/url.test.ts diff --git a/test/bun.js/atob.test.js b/test/js/web/util/atob.test.js similarity index 100% rename from test/bun.js/atob.test.js rename to test/js/web/util/atob.test.js diff --git a/test/bun.js/web-globals.test.js b/test/js/web/web-globals.test.js similarity index 99% rename from test/bun.js/web-globals.test.js rename to test/js/web/web-globals.test.js index aa5756c520..b7a243190b 100644 --- a/test/bun.js/web-globals.test.js +++ b/test/js/web/web-globals.test.js @@ -1,6 +1,6 @@ import { unsafe } from "bun"; import { expect, it, test } from "bun:test"; -import { withoutAggressiveGC } from "gc"; +import { withoutAggressiveGC } from "harness"; test("exists", () => { expect(typeof URL !== "undefined").toBe(true); diff --git a/test/bun.js/websocket-subprocess.ts b/test/js/web/websocket/websocket-subprocess.ts similarity index 100% rename from test/bun.js/websocket-subprocess.ts rename to test/js/web/websocket/websocket-subprocess.ts diff --git a/test/bun.js/websocket.test.js b/test/js/web/websocket/websocket.test.js similarity index 98% rename from test/bun.js/websocket.test.js rename to test/js/web/websocket/websocket.test.js index 61c9ec054d..f0f29c1c39 100644 --- a/test/bun.js/websocket.test.js +++ b/test/js/web/websocket/websocket.test.js @@ -1,9 +1,6 @@ import { describe, it, expect } from "bun:test"; import { unsafe, spawn, readableStreamToText } from "bun"; -import { bunExe } from "bunExe"; - -import { gc } from "./gc"; -import { bunEnv } from "bunEnv"; +import { bunExe, bunEnv, gc } from "harness"; const TEST_WEBSOCKET_HOST = process.env.TEST_WEBSOCKET_HOST || "wss://ws.postman-echo.com/raw"; diff --git a/test/bun.js/html-rewriter.test.js b/test/js/workerd/html-rewriter.test.js similarity index 99% rename from test/bun.js/html-rewriter.test.js rename to test/js/workerd/html-rewriter.test.js index e33710f28e..b5db3fde2e 100644 --- a/test/bun.js/html-rewriter.test.js +++ b/test/js/workerd/html-rewriter.test.js @@ -1,5 +1,5 @@ import { describe, it, expect } from "bun:test"; -import { gcTick } from "./gc"; +import { gcTick } from "../gc"; var setTimeoutAsync = (fn, delay) => { return new Promise((resolve, reject) => { diff --git a/test/macro/assert.tsx b/test/macro/assert.tsx deleted file mode 100644 index 8a6e4d8224..0000000000 --- a/test/macro/assert.tsx +++ /dev/null @@ -1,4 +0,0 @@ -// This logs the result at build time -export function unreachable(call) { - throw new Error(call.arguments[0].toString() || "unreachable"); -} diff --git a/test/macro/fetchSync.tsx b/test/macro/fetchSync.tsx deleted file mode 100644 index 51d1ca4f53..0000000000 --- a/test/macro/fetchSync.tsx +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -export async function fetchSync(ctx) { - const str = ctx.arguments[0].toString(); - - const response = await fetch(str); - const text = await response.text(); - - return ; -} diff --git a/test/macro/hello-fetch-macro.tsx b/test/macro/hello-fetch-macro.tsx deleted file mode 100644 index fa0de4a9d7..0000000000 --- a/test/macro/hello-fetch-macro.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { fetchSync } from "macro:./fetchSync.tsx"; - -const synchronousFetch = fetchSync(`https://example.com`); - -console.log(synchronousFetch); diff --git a/test/macro/loadMocks.tsx b/test/macro/loadMocks.tsx deleted file mode 100644 index 08e90dece6..0000000000 --- a/test/macro/loadMocks.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { unreachable } from "macro:./assert"; - -if (process.env.NODE_ENV !== "test") unreachable("This module should only be imported in tests"); - -export const mockData = { - Copilot: { - id: "Copilot", - name: "Copilot", - description: "Copilot", - icon: "https://s3.amazonaws.com/copilot-public/images/icons/Copilot.png", - color: "#00AEEF", - type: "service", - tags: ["copilot"], - categories: ["copilot"], - links: [ - { - id: "Copilot", - name: "Copilot", - url: "https://copilot.io", - description: "Copilot", - icon: "https://s3.amazonaws.com/copilot-public/images/icons/Copilot.png", - color: "#00AEEF", - type: "service", - tags: ["copilot"], - categories: ["copilot"], - }, - ], - }, -}; diff --git a/test/macro/macro.d.ts b/test/macro/macro.d.ts deleted file mode 100644 index ba02c03ede..0000000000 --- a/test/macro/macro.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module "macro:*"; diff --git a/test/bun.js/mkfifo.ts b/test/mkfifo.ts similarity index 100% rename from test/bun.js/mkfifo.ts rename to test/mkfifo.ts diff --git a/test/package.json b/test/package.json new file mode 100644 index 0000000000..dfeabcd42a --- /dev/null +++ b/test/package.json @@ -0,0 +1,19 @@ +{ + "private": true, + "name": "test", + "type": "module", + "devDependencies": { + "bun-types": "canary" + }, + "dependencies": { + "bktree-fast": "^0.0.7", + "body-parser": "^1.20.2", + "esbuild": "^0.17.11", + "express": "^4.18.2", + "iconv-lite": "^0.6.3", + "lodash": "^4.17.21", + "react-dom": "^18.2.0", + "svelte": "^3.55.1", + "undici": "^5.20.0" + } +} \ No newline at end of file diff --git a/test/bun.js/repro_631.test.js b/test/regression/issue/00631.test.ts similarity index 78% rename from test/bun.js/repro_631.test.js rename to test/regression/issue/00631.test.ts index 11eba44742..691c3227cf 100644 --- a/test/bun.js/repro_631.test.js +++ b/test/regression/issue/00631.test.ts @@ -1,10 +1,11 @@ import { expect, it } from "bun:test"; -import { bunExe } from "./bunExe.ts"; -import { bunEnv } from "./bunEnv.ts"; -import { mkdirSync, rmSync, writeFileSync, readFileSync } from "fs"; +import { bunExe, bunEnv } from "../../harness.js"; +import { mkdirSync, rmSync, writeFileSync, readFileSync, mkdtempSync } from "fs"; +import { tmpdir } from "os"; +import { join } from "path"; it("JSON strings escaped properly", async () => { - const testDir = import.meta.dir + "/repro_631/"; + const testDir = mkdtempSync(join(tmpdir(), "issue631-")); // Clean up from prior runs if necessary rmSync(testDir, { recursive: true, force: true }); @@ -23,6 +24,7 @@ it("JSON strings escaped properly", async () => { }); expect(exitCode).toBe(0); + console.log(testDir); const packageContents = readFileSync(testDir + "package.json", { encoding: "utf8" }); expect(packageContents).toBe(String.raw`{ "testRegex": "\\a\n\\b\\", diff --git a/test/bun.js/repro_2005.test.js b/test/regression/issue/02005.test.ts similarity index 86% rename from test/bun.js/repro_2005.test.js rename to test/regression/issue/02005.test.ts index dc0cd9a975..230be5301b 100644 --- a/test/bun.js/repro_2005.test.js +++ b/test/regression/issue/02005.test.ts @@ -1,6 +1,6 @@ import { it, expect } from "bun:test"; -it("regex literal with non-Latin1 should work", () => { +it("regex literal with non-latin1 should work", () => { const text = "这是一段要替换的文字"; //Correct results: 这是一段的文字 diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 0000000000..e879cd5f54 --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "noEmit": true, + "lib": ["ESNext"], + "module": "ESNext", + "target": "ESNext", + "moduleResolution": "nodenext", + "strict": true, + "downlevelIteration": true, + "skipLibCheck": true, + "jsx": "preserve", + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "allowJs": true, + "types": ["bun-types"], + "baseUrl": ".", + "paths": { + "harness": ["harness.ts"], + "mkfifo": ["mkfifo.ts"], + "node-harness": ["js/node/harness.ts"] + } + } +} diff --git a/tsconfig.json b/tsconfig.json index 518dca2c16..461fdb4724 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,8 +16,6 @@ "bench", "examples/react-fast-refresh-test", "examples/macros", - "test/bun.js/solid-dom-fixtures", - "test/bun.js/bundled", "src/deps", "bun-webkit", // JavaScriptCore builtins use a non-standard "@" symbol to indicate a private identifier which no other tool supports