## Summary
- **HTMLRewriter test**: Replaced `fetch("https://www.example.com/")`
with a local HTTP content server, eliminating dependency on external
HTTPS and system CA certificates
- **HTTPS agent test**: Replaced `https.request("https://example.com/")`
with a local TLS server using self-signed certs from harness
- **Expired certs**: Regenerated self-signed certificates in
`test/js/bun/http/fixtures/` and `test/regression/fixtures/` (were
expired since Sep 2024, now valid until 2036)
## Root cause
Tests fetching external HTTPS URLs (`https://example.com`,
`https://www.example.com`) fail on CI environments (Alpine Linux,
Windows) that lack system CA certificate bundles, producing
`UNABLE_TO_GET_ISSUER_CERT_LOCALLY` errors. This affected:
- `test/js/workerd/html-rewriter.test.js` (HTMLRewriter: async
replacement using fetch + Bun.serve)
-
`test/js/bun/test/parallel/test-https-should-work-when-sending-request-with-agent-false.ts`
## Test plan
- [x] `bun bd test test/js/workerd/html-rewriter.test.js` - 41 pass, 0
fail
- [x] `bun bd test test/js/workerd/html-rewriter.test.js -t "async
replacement using fetch"` - 1 pass
- [x] `bun bd
test/js/bun/test/parallel/test-https-should-work-when-sending-request-with-agent-false.ts`
- exits 0
- [x] `bun bd test test/js/bun/http/serve-listen.test.ts` - 27 pass, 0
fail (uses renewed certs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude <noreply@anthropic.com>
* windows: implement bun.isWritable
* windows: pass test/cli/run/as-node.test.ts
C:\Users\dave\AppData\Local\Temp\bun-node-a2ae984c3\node.exe is a hardlink on windows so it will not resolve to C:\bun\build\bun-debug.exe
skip the first param since that is not the behavior this test is supposed to be testing
* windows: pass test/js/node/dns/node-dns.test.js
* windows: pass test/js/node/process/process.test.js
* windows: pass test/js/web/streams/streams.test.js
* windows: pass test/js/workerd/html-rewriter.test.js
Closes#8459
* windows: fix node:util.inspect
* windows: these pass now
* windows: pass test/js/node/stream/node-stream.test.js
* disable http sendfile on windows
* use url.origin here
* more sendfile removal
* windows: pass test/js/web/websocket/websocket.test.js
* test/js/deno/performance/performance.test.ts is flaky, come back to it
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
* Simplify string handling code
* add extra + external
* Update fs.test.ts
* Bump
* woopsie
* prettier
* Rename stats() to resourceUsage()
* Fix leak
* Fix more leaks
* Setup malloc heap breakdown
* Thread safety
* Fix bug when creating buffer from utf-16 string
cc @dylan-conway
* Use global allocator
* More new
* Update fs.test.ts
* Update setTimeout.test.js
* Fix UAF in HTMLRewriter
* More bun.new
* Remove logs
* Un-skip test which no longer is flaky
* Even more `bun.new`
* Fix memory leak in HTMLRewriter.
Fixes#2325
* Don't accept Buffer for now
* Fix issue with node-fetch polyfill
* Don't destruct the response value too soon
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
* enable root certs on fetch
* rebase
* fix lookup
* some fixes and improvements
* fmt
* more fixes
* more fixes
* check detached onHandshake
* fix promise case
* fix cert non-Native
* add fetch tls tests
* more one test
* html rewriter response buffering
* pipe the data when marked as used
* fix empty response
* add some fetch tests
* deinit parent stream
* fix decompression
* keep byte_reader alive
* update builds
* remove nonsense
* was not nonsense after all
* protect tmp ret value from GC, fix readable strong ref deinit/init
* fmt
* if we detach the stream we cannot update the fetch stream
* detach checking source
* more tests, progress with javascript and Direct sink
* drop support for pure readable stream for now
* more fixes
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>