aboutsummaryrefslogtreecommitdiff
path: root/test/js/node (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-19ensure unused variable is not eliminatedGravatar Jarred Sumner 1-0/+2
2023-05-19Add tests for `node:vm`Gravatar Ashcon Partovi 1-0/+213
2023-05-19Make `node-fetch` polyfill better (#2962)Gravatar Jarred Sumner 1-0/+21
* Make `node-fetch` polyfill better * fixup * Test using localhost * Add comment --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-17Update fs.test.tsGravatar Jarred Sumner 1-7/+10
2023-05-17Fixes https://github.com/oven-sh/bun/issues/2931Gravatar Jarred Sumner 1-0/+26
2023-05-12windows path compatibility (#2869)Gravatar dave caruso 2-1/+1
* winndows path compatibility * change * to "star" and fix import --------- Co-authored-by: cirospaciari <ciro.spaciari@gmail.com>
2023-05-11fix child process tests (#2584)Gravatar Dylan Conway 1-1/+1
* always handle exit on next tick * emit spawn immediately
2023-05-11fix(fs) mkdtemp and mkdtempSync errors (#2851)Gravatar Ciro Spaciari 1-0/+17
* fix mkdtemp * fmt * fix errno
2023-05-11add support for { all: true } option on dns.lookup (#2846)Gravatar Ciro Spaciari 1-0/+8
2023-05-11Report timings for failing tests tooGravatar Jarred Sumner 1-1/+1
2023-04-27:nail_care:Gravatar Jarred Sumner 2-15/+4
2023-04-27fix: make node:crypto Hash.copy work correctly (#2761)Gravatar Silver 2-0/+98
This commit will also: - add a CryptoHasher.copy function - make CryptoHasher.digest reset the hasher so it can be reused Resolves #2651
2023-04-21Keep the node crypt otestGravatar Jarred Sumner 1-6/+67
2023-04-21Revert "use a lazyily initialized stream for `node:crypto` `createHash` (#2652)"Gravatar Jarred Sumner 3-80/+7
This reverts commit 3a2fd65f20d3b4e99c89f789acec5e5e40615008.
2023-04-21Revert "implement `node:events` in javascript (#2604)"Gravatar Jarred Sumner 2-451/+96
This reverts commit 96a2ed1040d5a0ca51ae41267cba4f8e5d0a6142.
2023-04-18implement `node:events` in javascript (#2604)Gravatar dave caruso 2-96/+451
* initial event emitter reimplementation * implement most of node:events. tests passing * work on emitter * fix importing node:events * work on event emitter tests * event work * event work * event stuff and experimenting with a lazy createHash * cleanup crypto stuff i had on this branch * finish event stuff up * fix error monitor * validate listeners are functions * changes requested
2023-04-17Fixes #2676Gravatar Jarred Sumner 1-0/+22
2023-04-17Get axios working (#2673)Gravatar Jarred Sumner 2-605/+624
* Revive node:http tests * Fix a couple bugs in node:http * possibly breaking: use `"browser"` exports condition last * Make URL validation error better --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-13use a lazyily initialized stream for `node:crypto` `createHash` (#2652)Gravatar dave caruso 3-7/+80
* lazy hash * finish up crypto stuff * remove lockfiles * ok * add pipe test * update this lockfile * remove unrelated crypto benchmark from this file
2023-04-13fix node-net-test hang (#2649)Gravatar Ciro Spaciari 1-29/+27
* fix tests * fix fmt * fix fmt
2023-04-13Upgrade WebKit (#2643)Gravatar Jarred Sumner 1-1/+1
* Missing export * Regenerate builtins * Fix crash in require() * Various breaking JSC changes * hopefully speed up C++ compilation a little * Skip failing test fo rnow * Update WebKit * Add a comment * Fix error in postinstall * Update WebKit --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-12fix types and add more reliable tests (#2621)Gravatar Ciro Spaciari 2-312/+363
2023-04-12could include `/private/` on macosGravatar Dylan Conway 1-1/+2
2023-04-07feat(tls.Server) basic support (cert, key, rejectUnauthorized, requestCert, ↵Gravatar Ciro Spaciari 4-0/+708
ca) #2412 (#2552) * cherry picked * add StringOrBuffer parameter * Format and adds types * update uws * fix tests * more types * fix typing * add timeouts, clean some stuff * move tests to describe * fixes SSL hostname when Host is provided * cleanup on tests * change 127.0.0.1 to 0.0.0.0 * try another listening parameter * test timings and update uws * remove unnecessary comment * move listening event around * always await Bun.connect * do not fail if the tests already passed when using Bun.connect * regenerate classes * undo generated classes * generate classes * fix merge --------- Co-authored-by: cirospaciari <cirospaciari@MiWiFi-RA82-srv.cirospaciari>
2023-04-06fix: export `constants` from `fs/promises` (#2567)Gravatar dave caruso 1-0/+5
* fix: export `constants` from `fs/promises` * fix type tests * third time's the charm fixing the typedef * run fmt * remove injected constant from fs, re-exporting from fs/promises
2023-04-06bun-types: infer strict `Subprocess` from `Bun.spawn()` options, part 2 (#2573)Gravatar dave caruso 1-1/+1
2023-04-05PrettierGravatar Jarred Sumner 1-2/+2
2023-04-05fix: modules to have null prototype (#2561)Gravatar hiroki osame 1-0/+4
2023-04-04Implement `import.meta.main` (#2556)Gravatar Jarred Sumner 1-0/+1
* Implement `import.meta.main` * Update main-test-1.js * Update fs.test.ts --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-04Dylan/fix some failing tests (#2544)Gravatar Jarred Sumner 2-5/+22
* handle `umask()` invalid arguments * move `bktree-fast` to test root, fix postinstall * fix fs test * could be baseline * handle different timezones * accidentally deleted tests * fix hang in `AbortSignal.timeout` * bring abort tests back * Revert "bring abort tests back" This reverts commit 0ff2ad5bf408694ac719b8ba0a38b16070e10201. * bunx node-gyp * bun x * fix typecheck * test * Update inspect.test.js --------- Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2023-04-01Add stubs for missing node builtins (#2534)Gravatar Jarred Sumner 1-0/+120
* Stub `node:v8` * Stub `node:trace_events` * Stub `node:repl` * Stub `node:inspector` * Stub `node:http2` * Stub `node:diagnostics_channel` * Stub `node:dgram` * Stub `node:cluster` * Link stubs * cleanup * Clean up the test * Implement `node:vm` stub * Cleanup `v8` module stub * Add missing `promises` export to node:stream * Implement `node:stream/promise` * Implement `node:assert/strict` * cleanup * better errors * Increaase timeout * Update inspector.exports.js * Make the version consistent * Implement `process.binding("constants")` * Update runner.node.mjs --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-03-28More bug fixes (#2486)Gravatar Jarred Sumner 5-73/+107
* readline_promises test fix * fix `escapeHTML` for baseline builds * fs test fixes, use `tmpdir()` * add paths for `resolve.test.js` * isError with toString symbol and error prototype * comment about `toString` * skip async macro transform * test cleanup, skip stack format test * readline undo and redo fix * capture error from readline keypress * Update tcp-server.test.ts * use `removefileat` for recursive rmdir * use strong for `signal.reason` * initialize `m_flags` * directory with file fs test * recursive option * import expect * could be less than * move abort signal tests to another process * fix typecheck --------- Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2023-03-22A couple bug fixes (#2458)Gravatar Dylan Conway 6-17/+223
* fix valid status code range * update path * highwatermark option * throw DOMException * remove extra transpiler output * more transpiler tests * comment * get index not quickly * replace with `getDirectIndex` * update abort test * throw out of range status code * promisify test fix * move stdio test instance files * working crypto tests * allow duplicate set-cookie headers * different formatting * revert, fix will be in different pr * it is called * use min buffer size * fix url tests * null origin for other protocols * remove overload * add very large file test * await * coerce to int64 * 64 * no cast * add todo blob url tests * use `tryConvertToInt52`
2023-03-22Fix types (#2453)Gravatar Colin McDonnell 13-81/+116
* WIP * WIP * WIP * WIP * Improve typechecking in type files * Fix typechecking * Update * Update submodule * CI for typechecking * Add ci * Update commands * Format after build * Dont use bunx * Rename job * Use nodemodules prettier * Update workflow * Use symlink * Debug * Debug * Clean up and rename jobs
2023-03-19Reduce number of module scopes createdGravatar Jarred Sumner 1-1/+1
2023-03-19Remove usages of port numbers in testsGravatar Jarred Sumner 1-2/+2
2023-03-19Several bug fixes (#2427)Gravatar Jarred Sumner 1-1/+1
* Fix test * Fix segfault when unexpected type is passed in `expect().toThrow` * Fix issues with request constructor * Don't bother cloning headers when its empty * woops * more tests * fix incorrect test * Make the fetch error messages better * Update response.zig * Fix test that failed on macOS * Fix test * Remove extra hash table lookups * Support running dummy registry directly cc @alexlamsl * Update test * Update test * fixup * Workaround crash in test runner * Fixup test * Fixup test * Update os.test.js --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-03-18Always clear timers in node test harnessGravatar Jarred Sumner 1-12/+30
2023-03-18Make node-net tests less flakyGravatar Jarred Sumner 1-6/+10
2023-03-15Rename `expectObjectTypeCount` to `expectMaxObjectTypeCount`Gravatar Jarred Sumner 1-2/+2
2023-03-15fix gc-related flaky test failures (#2402)Gravatar Alex Lam S.L 1-19/+13
2023-03-15fix fixtureGravatar Jarred Sumner 1-2/+2
2023-03-14Update child_process-node.test.jsGravatar Jarred Sumner 1-4/+4
2023-03-14Fix node test harnessGravatar Jarred Sumner 4-189/+223
2023-03-13feat(net.createServer) and adds socket.connect IPC support (#2337)Gravatar Ciro Spaciari 2-18/+579
* added net.Server * fix fmt * fix cast and move test * fix node-net.tests.ts but breaks server data receive * fix end and close only emitting when data or pipe was added * fix socket starting paused * add echo test * fix fmt * fix fmt * on close if the socket is paused, keep paused until the user resumes it to match node behavior * resume on connect * fix getConnections, error on close, make _Handler private and create symbols for SocketServerHandlers * add path support (IPC) * fix unix domains support, add connect unix tests * fix unix socket tests * emit listening and listening error on next tick * fix connection flask test * try fix connect error on macos test * merge connection and drop tests * added exclusive option * fix socket.zig fmt * fix validation for options and add test for it * pass prettier fmt
2023-03-07"binary" is an alias of "latin1"Gravatar Jarred Sumner 1-0/+6
Fixes https://github.com/oven-sh/bun/issues/2110
2023-03-07improve `Buffer` compatibility with Node.js (#2341)Gravatar Alex Lam S.L 1-1153/+979
* improve `Buffer` compatibility with Node.js * use `memmove()` allow `encoding` to be `undefined`
2023-03-07Reorganize tests (#2332)Gravatar Ashcon Partovi 51-0/+11591