aboutsummaryrefslogtreecommitdiff
path: root/test/js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-08-02Rewrite built-in modules to use CommonJS over ESM (#3814)Gravatar dave caruso 6-2560/+2539
* stfdsafsd sadffdsa stuff finish commonjs stuff asdf not done but work not done but work not done yet but this is how far i am remove files lol update built files uncomment everything in events lol export default stuff * afdsafsd * its not perfect but almost done * okay * cool * remove temp file * finish rebase * revert settings.json * a * ch-ch-ch-ch-changes * okay * remove this check in release for now * sxdcfghnjm, * lkjhgf * fmt * filename can be null * Update NodeModuleModule.h * weee * fmt --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-02Fixes #3931 (#3933)Gravatar Jarred Sumner 2-1/+15
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-01close `BroadcastChannel` in testsGravatar Dylan Conway 2-1/+49
2023-08-01Fix some flaky tests (#3919)Gravatar Ciro Spaciari 2-23/+91
* fix some flask tests * fix condition on prisma test * oops
2023-08-01add `BroadcastChannel` (#3922)Gravatar Dylan Conway 3-14/+166
* copy and format * update `SerializedScriptValue.cpp` * use `expect().fail()` in message channel tests * rename `BroadcastChannelIdentifier.h` * copy registries * progress and tests * cleanup * worker and broadcast channel test * `BroadcastChannel` ref and unref * `MessagePort` ref, unref, and hasRef * remove `SecurityContext.cpp/h` * add types
2023-08-01Update worker.test.tsGravatar Dylan Conway 1-1/+1
2023-08-01Implement Worker.prototype.threadIdGravatar Jarred Sumner 1-0/+1
2023-07-31throw error if node module does not exist (#3913)Gravatar Vlad Sirenko 1-0/+7
2023-07-31Add a test for TransformStreamGravatar Jarred Sumner 1-4/+43
2023-07-30Fix memory leak in response.clone(), further reduce memory usage of Request ↵Gravatar Jarred Sumner 4-9/+42
& Response (#3902) * Atomize respsone.url & response.statusText * Fix warning * Atomize Request & Response URLs when possible * Fix memory leak in response.clone() bun/bench/snippets on  jarred/atomize ❯ mem bun --smol request-response-clone.mjs cpu: Apple M1 Max runtime: bun 0.7.2 (arm64-darwin) benchmark time (avg) (min … max) p75 p99 p995 -------------------------------------------------------- ----------------------------- req.clone().url 77.3 ns/iter (40.35 ns … 222.64 ns) 91.53 ns 128.11 ns 172.78 ns resp.clone().url 162.43 ns/iter (116 ns … 337.77 ns) 177.4 ns 232.38 ns 262.65 ns Peak memory usage: 60 MB bun/bench/snippets on  jarred/atomize ❯ mem bun-0.7.1 --smol request-response-clone.mjs cpu: Apple M1 Max runtime: bun 0.7.1 (arm64-darwin) benchmark time (avg) (min … max) p75 p99 p995 -------------------------------------------------------- ----------------------------- req.clone().url 115.85 ns/iter (80.35 ns … 247.39 ns) 128.19 ns 181.93 ns 207.23 ns resp.clone().url 252.32 ns/iter (202.6 ns … 351.07 ns) 266.56 ns 325.88 ns 334.73 ns Peak memory usage: 1179 MB * Update tests * Update js_ast.zig * Update test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-30skip flay testGravatar Jarred Sumner 1-1/+1
2023-07-30Fix issue with file loader (#3889)Gravatar Jarred Sumner 1-1/+1
* Fix issue with file loader * Update jest-extended.test.js --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-30Fix coredump when reading an empty file(`node:stream:createReadStream`) (#3882)Gravatar Ai Hoshino 1-0/+26
* Fix coredump when reading an empty file. Close: #3607 * It seems that the fd is closed when `auto_close` is true.
2023-07-30Improv. (#3885)Gravatar Tiramify (A.K. Daniel) 2-24/+22
2023-07-28Stat largefile test (#3870)Gravatar Jarred Sumner 1-0/+22
* Add test for stat on a large file * Update fs.test.ts --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-28Mark broken test as todoGravatar Jarred Sumner 2-1/+5
2023-07-28fix types and add message channel/port gc testGravatar Dylan Conway 1-3/+15
2023-07-28`MessageChannel` and `MessagePort` (#3860)Gravatar Dylan Conway 4-1/+270
* copy and format * copy * copy * cleanup * some tests * spellcheck * add types * don't lock getting contextId * array buffer test
2023-07-28mark tests as todoGravatar Jarred Sumner 2-81/+75
2023-07-28add fork to child_process (#3851)Gravatar Vlad Sirenko 5-3/+284
* add fork to child_process * fix export * add test to child_process method `fork` * fmt fork * remove only from test
2023-07-28feat(bun/test): Impl. expect().pass() & expect().fail() (#3843)Gravatar Tiramify (A.K. Daniel) 1-5/+10
* Impl. pass & fail * fix * fix 2 * smol
2023-07-28fix the chunk boundary (`node:stream:createReadStream`) (#3853)Gravatar Ai Hoshino 1-0/+82
* fix the slice boundary. Close: #3668 * Add more boundary test case. * fix end is 0.
2023-07-28Support file: URLs in `fetch` (#3858)Gravatar Jarred Sumner 2-0/+11
* Support file: URLs in `fetch` * Update url.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-28fix(tls) exposes native canonicalizeIP and fix rootCertificates (#3866)Gravatar Ciro Spaciari 2-2/+43
* exposes native canonicalizeIP * remove unintended duplicate * add tests * add tests for debug builds * add rootCertificates test and fix len * just randomize test ids on prisma * remove work around and bump usockets with the actual fix * fix case * bump uws
2023-07-28Fixes #3795 (#3856)Gravatar Jarred Sumner 2-0/+37
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-27Add `Bun.isMainThread`Gravatar Jarred Sumner 2-0/+29
2023-07-27Uncomment testGravatar Jarred Sumner 1-1/+1
2023-07-27Resolve watch directories outside main thread + async iterator and symlink ↵Gravatar Ciro Spaciari 2-4/+100
fixes (#3846) * linux working pending tests with FSEvents * add more tests, fix async iterator * remove unnecessary check * fix macos symlink on directories * remove indirection layer * todos * fixes and some permission test * fix opsie and make prisma test more reliable * rebase with main * add comptime check for macOS * oops * oops2 * fix symlinks cascade on FSEvents * use JSC.WorkPool * use withResolver, createFIFO and fix close event on async iterator * remove unused events --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-07-27Make readFile() async (#3850)Gravatar Jarred Sumner 2-1/+30
* less leaky * async readfile * Update types.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-27Make readdir() async, fix crash in large directory trees (#3838)Gravatar Jarred Sumner 1-0/+81
* Fix unsafe GC behavior on large arrays returned by fs * Fix crash in large arrays of strings * async readdir * Add tests for large number of files returned by readdir * Move this down * Fix encoding edgecase in path.join * Async stat & lstat * add test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-26Start time performance improvements to build tools (#3797)Gravatar Jarred Sumner 2-19/+29
* Make os.cpus() faster on Linux * Fix crash See https://github.com/ziglang/zig/issues/16540 * Handle watcher_count == 0 * Add assertion * Clean up lifetimes of fs watcher a little * :scissors: * Use `errdefer` * Make the error better * Make os.cpus() more lazy * Please don't translate-c on the entire C standard library * immediately closing works correctly is still bug * ops * fmt+fixeup * add back verbose * free instead of destroy * remove destroy option for watcher tasks * flush verbose and add debug log * fixup files * use log for debug --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: cirospaciari <ciro.spaciari@gmail.com>
2023-07-25fix the encoding of `dirname`'s return value. (#3799)Gravatar Ai Hoshino 1-0/+39
2023-07-25fix some cases in the `dirname` function. (#3785)Gravatar Ai Hoshino 1-19/+86
Close: #3782
2023-07-24test gardeningGravatar Jarred Sumner 2-2/+2
2023-07-24Merge import.meta.require and require to be the same thing (#3732)Gravatar dave caruso 2-2/+38
* Merge import.meta.require and require to be the same thing * support `require` and BunPlugin (runtime plugin) * plugins * unused code * revert launch.json
2023-07-24Make this test less flakyGravatar Jarred Sumner 2-3/+6
2023-07-24Less flakyGravatar Jarred Sumner 1-4/+4
2023-07-24slow test is allowed to be slowGravatar Jarred Sumner 1-1/+1
2023-07-23Fix bugs with connecting to localhost (#3758)Gravatar Jarred Sumner 2-3/+3
* Fix bugs with connecting to localhost * Update uws * More logs * Allow not setting a hostname * Make server.hostname & server.protocol faster * Fixup * normalize listening host * Fix test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-22[install] improve workspace substitution of npm dependencies (#3754)Gravatar Alex Lam S.L 1-1/+1
- respect semver ranges
2023-07-22Fixes ↵Gravatar Jarred Sumner 1-0/+53
https://discord.com/channels/876711213126520882/1131175053409656833/1131175053409656833 @tr1ckydev this fixes the issue you ran into, see the diff for an example usage of a Bun.plugin that makes a network request on import.
2023-07-22fix path.format for `vite build` (#3734)Gravatar dave caruso 1-1/+5
* fix path.format for vite * Update path.test.js --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-22Fix `writeFileSync` when the mode is greater than 0o777. (#3747)Gravatar Ai Hoshino 1-1/+6
Close: #3740
2023-07-22Fixes #3744Gravatar Jarred Sumner 1-1/+17
2023-07-22Unified event loop (#3741)Gravatar Jarred Sumner 6-0/+273
* Unified event loop * Update WebKit, add test for es-module-lexer * Update README.md * Use async wasm * Explicitly set whether concurrenttask should be deinit'd * Update package.json --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-21Use WebKit's URL parser in fetch() and `bun install` (#3730)Gravatar Jarred Sumner 1-1/+1
* Use WebKit's URL parser in fetch() and `bun install` * Allocate less memory * Fix test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-21handle `latin1` in `Bun__encoding__toString`. (#3739)Gravatar Ai Hoshino 1-0/+10
Close: #3738
2023-07-22improve test (#3731)Gravatar Alex Lam S.L 1-11/+9
- minor build diffs
2023-07-21clean tables before testing (#3721)Gravatar Ciro Spaciari 1-2/+10
* clean tables before testing * typo
2023-07-20Update async_hooks.node.test.tsGravatar Dylan Conway 1-1/+1