aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-03-14Move tobeInstanceOf() tests to expect.test.tsGravatar Ashcon Partovi 1-11/+0
2023-03-14feat: add toBeInstanceOf matcher in expect (#2389)Gravatar zhiyuan 1-0/+11
2023-03-07Reorganize tests (#2332)Gravatar Ashcon Partovi 234-41303/+0
2023-03-06Fixes #2323Gravatar Jarred Sumner 1-0/+28
2023-03-06fix & clean up tests (#2318)Gravatar Alex Lam S.L 1-146/+130
- skip flaky tests when running as `root` - use `expect().toThrow()` - clean up temporary files after tests
2023-03-06support `expect().toThrow(/pattern/)` (#2314)Gravatar Alex Lam S.L 4-67/+49
- fix time-zone-dependent test failure
2023-03-05consider current working directory when resolving relative paths (#2313)Gravatar Alex Lam S.L 2-1/+30
* consider current working directory when resolving relative paths fixes #2298 * comment test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-03-05[install] fix connection error detection (#2307)Gravatar Alex Lam S.L 6-81/+144
2023-03-05Test action comment (#2310)Gravatar Jarred Sumner 1-1/+0
* test * Update bun-linux-build.yml * fixup * Update bun-linux-build.yml * Use outputs * set id * Update bun-linux-build.yml * Update runner.node.mjs * Update runner.node.mjs * wip (will revert) * Update runner.node.mjs * Update runner.node.mjs * Update runner.node.mjs * Update runner.node.mjs * Update bun-linux-build.yml * Update bun-linux-build.yml * works well enough for now --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-03-04oopsGravatar Jarred Sumner 1-64/+30
2023-03-04[install] use `latest` tagged version if in range (#2302)Gravatar Alex Lam S.L 1-0/+62
2023-03-04fix(bunx): can't resolve executable for scoped packages (#2293)Gravatar Fran Zekan 1-1/+40
Fixes #2292
2023-03-03fix(node:http): match Node headers casing (lowercase only) (#2288)Gravatar Derrick Farris 2-0/+27
* fix(node:http): match Node headers casing (lowercase only) * fix(JSFetchHeaders): `WTFMove` the ascii string
2023-03-03fix(bunx): Show usage when calling bunx without arguments (#2295)Gravatar Fran Zekan 1-0/+19
* Make sure to return a helpful error message if no args are passed to bunx * Add tests for bunx without args
2023-03-03Improve types for `node:http` (#2284)Gravatar Colin McDonnell 1-2/+18
* Document node:http * Fix test * Fix default * Fix default
2023-03-03Fix http server req url (#2285)Gravatar zhiyuan 1-1/+2
* fix: http url add search query * fix: add tests
2023-03-02Add a zig fmt action (#2277)Gravatar Jarred Sumner 9-47/+88
* Add a zig fmt action * add failing file * Setup prettier better * Update prettier-fmt.yml * Fail on error * Update prettier-fmt.yml * boop * boop2 * tar.gz * Update zig-fmt.yml * Update zig-fmt.yml * Update zig-fmt.yml * Update zig-fmt.yml * Update zig-fmt.yml * boop * Update prettier-fmt.yml * tag * newlines * multiline * fixup * Update zig-fmt.yml * update it * fixup * both * w * Update prettier-fmt.yml * prettier all the things * Update package.json * zig fmt * ❌ ✅ * bump * . * quotes * fix prettier ignore * once more * Update prettier-fmt.yml * Update fallback.ts * consistentcy --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-03-02Add fs/promises tests and migrate fs.test.js to TypeScript (#2279)Gravatar Colin McDonnell 3-20/+39
2023-03-02fix(os.tmpdir()) strip trailing slash on *unix machines (#2276)Gravatar Ciro Spaciari 1-2/+7
* fix(os.tmpdir()) strip trailing slash on *unix machines * make use of strings.withoutTrailingSlash(dir);
2023-03-02Ensure prettier knows where to lookGravatar Jarred Sumner 1-1/+2
2023-03-02add tests for scoped dependency aliasing (#2271)Gravatar Alex Lam S.L 3-15/+111
2023-03-02fix tmp dir in fetch.tests.js (#2270)Gravatar Ciro Spaciari 1-1/+2
2023-03-02Fix `Bun.sleepSync` to actually use milliseconds (#2242)Gravatar Justin Whear 2-1/+33
* Fix Bun.sleep/sleepSync to actually use milliseconds `Bun.sleepSync` was accidentally treating its argument as seconds rather than milliseconds as the docs stated. This is a breaking change in that the function now behaves as documented. Fixed relevant tests. * sleepSync: add more argument checking, tests
2023-03-01fix bun server segfault with abortsignal (#2261)Gravatar Ciro Spaciari 1-109/+0
* removed redundant tests, fixed server segfault * fix onRejectStream, safer unassign signal * fix abort Bun.serve signal.addEventListener on async * move ctx.signal null check up * keep original behavior of streams onAborted
2023-03-01fix(node:http): match Node `http.request()` GET/HEAD w/ body (#2262)Gravatar Derrick Farris 1-0/+25
2023-03-01Add a test for https request in node:httpGravatar Jarred Sumner 1-0/+16
2023-03-01fix(node:http/https): fix passing `URL` objs to `http.request`(#2253) (#2258)Gravatar Derrick Farris 1-28/+47
* fix(node:http/https): fix passing `URL` objs to `http.request`(#2253) * fix(node:http): hoist debug env var * fix(node:http): make body `undefined` when falsy
2023-03-01fix deinit behavior when connection is aborted using ResponseStream and ↵Gravatar Ciro Spaciari 1-0/+114
abort event behavior (#2252) * fix deinit behavior when connection is aborted using ResponseStream * fix abort handling on stream, and get better tests * avoid segfault by trying to deinit 2x when aborted * make tests more reliable * more reliable onResolveStream after aborted * add test case for not firing the abort signal
2023-03-01fix Bun.file.arrayBuffer() segmentation fault on empty file #2248 (#2249)Gravatar Ciro Spaciari 2-0/+8
* fix Bun.file.arrayBuffer() segmentation fault on empty file #2248 * cleanner this.iotask check
2023-02-28Fix typecheckGravatar Colin McDonnell 1-1/+1
2023-02-28Make response.body `null` only when user explicitly passes null/undefinedGravatar Jarred Sumner 1-1/+1
2023-02-28Add back the testsGravatar Jarred Sumner 1-0/+23
2023-02-28Add explicit Null tag to BodyGravatar Jarred Sumner 1-82/+57
This reverts commit e538bb31ad7a2c4b4ce2b1f7d6b18a3140939950.
2023-02-28Implement `preload` support (like `node -r ` except in a config file) (#2231)Gravatar Jarred Sumner 1-0/+227
* Update Makefile * Introduce `preload` * Add a test * Support entry points --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-02-27fix(bun:sqlite): fix `sqliteDb.run(' ')` throwing `not an error` (#2226)Gravatar Derrick Farris 1-0/+23
2023-02-27use abort signal on http.ClientRequest (#2222)Gravatar Ciro Spaciari 1-0/+41
* use abort signal on http.ClientRequest * fix edge case and add test
2023-02-27add signal on http.Server.listen (#2223)Gravatar Ciro Spaciari 1-0/+26
* add signal on http.Server.listen * actual call close instead of just stopping the server
2023-02-27Feat/os.network interfaces (#2142)Gravatar Justin Whear 1-1/+2
2023-02-27resolve duplicated dependency correctly (#2213)Gravatar Alex Lam S.L 2-0/+232
2023-02-25improve `bun pm ls` (#2192)Gravatar Alex Lam S.L 1-0/+248
2023-02-25make the test fasterGravatar Jarred Sumner 1-11/+9
2023-02-24fix(body) Make Request/Reponse empty body to be null (#2156)Gravatar Ciro Spaciari 1-57/+82
* make empty nullable * revert mistake change
2023-02-24prefer `bun.copy()` over `std.mem.copy()` (#2152)Gravatar Alex Lam S.L 1-1/+2
2023-02-23Upgrade Zig (#2151)Gravatar Dylan Conway 2-7/+3
* fixup * Upgrade Zig * Remove bad assertion * strings * bump * mode -> optimize * optimize * Linux build * Update bindgen.zig
2023-02-23fix illegal memory reference in `bun link` (#2147)Gravatar Alex Lam S.L 1-9/+133
2023-02-22Fix flaky testsGravatar Jarred Sumner 3-11/+9
2023-02-22feat(undici): add `undici.request` (#2136)Gravatar Derrick Farris 1-0/+140
* wip(undici): get basic requests working * wip(undici): implement most request params, add tests * fix(undici): get tests passing for `undici.request` * test(undici): test headers in `undici.request`
2023-02-22Add leaky testGravatar Jarred Sumner 1-0/+38
2023-02-22Add a request.signal test with Bun.serveGravatar Jarred Sumner 1-7/+35
2023-02-22Fix flaky request.signal implementationGravatar Jarred Sumner 1-15/+53