aboutsummaryrefslogtreecommitdiff
path: root/test/js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-21[internal] Fix potential missing callbacks in AbortSignalGravatar Jarred Sumner 1-208/+0
2023-05-21fix(tls.connect) fix SNI on tls sockets and also servername (mongodb) (#2934)Gravatar Ciro Spaciari 8-47/+43
* fixes SNI on tls sockets and also servername * 💅 * 💅 * add support for https and wss * fix bun types * support Bun.file on ca, key and cert * 💅 * add setTimeout (makes fastify run) * fix httpVersion * fix WebSocketServer and add listen event * fix ws exports and http listening * fix default import * bump uws * add nodebuffer compatibility * fix drain and allow more passing tests to run * fix enqueud messages * default to arraybuffer * fix constructor binaryType * fmt * fixup * skip some tests * skip more * skip fault tests * reuse encoder instance * fix handshake WS Client * temporary revert handshake fix * fix handshake * disable all socket.io test temp * fixup * add back socket.io tests * use node_fs to read cert, ca and key on server.zig * throw the error returned by NodeFS * 💅
2023-05-20[bun:test] Add tests for `--preload` with `beforeAll`, `afterAll`, ↵Gravatar Jarred Sumner 3-5/+88
`afterEach`, `beforeEach`
2023-05-20Implement `test.todo` (#2961)Gravatar Degreat 3-0/+47
* Implement `test.todo` * remove skip condition * Allow callbacks in .todo * Add descriptive comment * Log todos * Include tests in title * edit test.todo tests --------- Co-authored-by: dave caruso <me@paperdave.net>
2023-05-20[bun:test] Fix bug where indexed properties would print "undefined" in diffsGravatar Jarred Sumner 3-0/+33
2023-05-20Support test timeouts in `bun:test` (#2969)Gravatar Jarred Sumner 2-8/+44
* [bun:test] Support timeouts in `test` * make this test more resilient * :scissors: --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-19console.log changes (#2966)Gravatar Jarred Sumner 3-72/+72
* [breaking] Don't quote property names of identifiers in console.log * Make UTF-16 strings green * always quote for jest * update tests * Update this --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
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-18Implement `expect().toBeCloseTo()` (#2870)Gravatar Degreat 2-1/+50
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-16feat(WebSocketServer) WebSocketServer wrapper + socket.io initial support ↵Gravatar Ciro Spaciari 16-0/+5154
(#2880) * WebSocketServer wrapper + socket.io initial support * fix up backpressure * fix up backpressure * fix http address * add socket.io tests * add closing tests * add connection state recovery tests for socket.io * add handshake test * add middeware tests for socket.io * added socket.io socket middleware tests * add more socket.io test comment/skip hang tests * add pending package for tests * add server attachment servers for socket.io * add utility-methods tests for socket.io * rename * rename * add messaging-many socket.io tests * add namespaces tests to socket.io * skip some tests * fmt * add packages to general package.json
2023-05-15Fix broken testGravatar Jarred Sumner 1-17/+8
2023-05-15Fix bug with `req.url` set incorrectly (#2881)Gravatar Jarred Sumner 1-0/+15
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-14fix(spawn) add Uint8Array support for stdout (#2866)Gravatar Ciro Spaciari 1-0/+64
* add array_buffer support for stdout * fix comment * fix param name on baby_list * keep test names consistent * add more test cases
2023-05-14feat(Timer.refresh) add refresh support on Timer (#2874)Gravatar Ciro Spaciari 2-0/+73
* add refresh support on Timer * fix this return * add refresh setTimeout tests * fix tests and add setInterval test * use setCached for arguments and callback --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
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-12fix proxy status return (#2860)Gravatar Ciro Spaciari 1-4/+4
2023-05-12fix large stdout output (#2850)Gravatar Ciro Spaciari 2-1/+20
* fix large stdout output * remove skip from #2674 for testing * add big stdout test using spawnSync * add bunEnv on big stdout test
2023-05-11bundler tests and improve `Bun.build` return type (#2833)Gravatar dave caruso 3-9/+9
* importstar_ts * tests * run acorn test suite * bench tweaks * test * bun.build tests very incomplete * remove dataurl and base64 loaders from tests since they dont work yet * tests * stuff * stuff * add errors and array of blobs * work so far * docs * requested changes * fix overwrite docs * remove this file
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 tests for ws.close (#2844)Gravatar Ciro Spaciari 1-0/+144
* add tests for ws.close * add timeout on ws.close tests
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-05-10Implement `describe.skip` (#2836)Gravatar Degreat 1-1/+147
* Implement describe.skip * Add more tests to cover hooks
2023-05-10feat(fetch) add redirect: 'error' support (#2845)Gravatar Ciro Spaciari 1-0/+21
* add redirect: 'error' support * fix typo * fix typo * refactor FetchRedirect enum * fix FetchRedirect * updated
2023-05-10Clean-up 85b4be5f7189e51e63672ddc874e7c6e09ae8befGravatar Jarred Sumner 1-0/+10
- We don't need to make `Bun__fetch` exported in every C++ header file - We shouldn't return JSObjectRef, its an unnecessary wrapper - The version of `fetch` on the Bun global should be non-configurable so that it is safe for anyone who wants to use that without a user-modifiable one
2023-05-10fix(fetch) fix fetch inheritance (#2842)Gravatar Ciro Spaciari 1-0/+5
* patch fetch function inheritance * fmt * fix reserveCapacity and number of arguments for fetch * change Bun.fetch to use Fetch.jsFunction * merge Fetch.jsFunction and Fetch.call * remove commented code
2023-05-09fix #2820 (#2832)Gravatar dave caruso 1-0/+10
2023-05-04Throw error on non-file urlGravatar Jarred Sumner 1-0/+13
2023-04-30Bun Test matchers even/odd. Also, .toContains fix and truthy (#2754)Gravatar Will Richards 2 1-0/+159
* bun test matcher tests for even/odd, few more truthy tests, and fix for contains empty string * implementation of even/odd matchers * didn't add the codegen bindings * linted
2023-04-29Clean up args parsing with `--loader`Gravatar Jarred Sumner 1-7/+2
2023-04-28Improves Body.Value life cycle and Signal life cycle on server.zig (#2752)Gravatar Ciro Spaciari 3-8/+43
* reestruct request body value and signal * revert react-hello-world * fix constructInto and test * fmt * fix body nullable * Request can outlive RequestContext * fmt * BodyValue is now HiveRef * hasDecl for Ref and HiveRef * fix deinit call on Ref/HiveRef * adds InlineBlob * fix Bun.inspect when using InlineBlob * revert InlineBlob * Fix mimalloc-debug * Add TODO note * fix: make node:crypto Hash.copy work correctly (#2761) This commit will also: - add a CryptoHasher.copy function - make CryptoHasher.digest reset the hasher so it can be reused Resolves #2651 * :nail_care: * address unicode issue (#2763) * Fix an oopsie * Another oopsie * use inline for * Fixup --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> * Request can outlive RequestContext * fmt * garantee to have the abort signnal attached to the server before abort the client on bun-server test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Silver <14016168+silversquirl@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
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-14Support importing `.txt` files as strings (#2660)Gravatar Jarred Sumner 5-0/+38
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-13Update import-meta.test.jsGravatar Dylan Conway 1-1/+1
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