You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test("line iterator should iterate as lines are written to stream",async()=>{constbunLines=Bun.$`sleep 1; echo "1"; sleep 1; echo "2"; sleep 1; echo "3";`.lines()letlastTime=performance.now()forawait(constlineofbunLines){constcurrentTime=performance.now()constdelta=currentTime-lastTimeconsole.log(`Line: ${line} took ${delta}ms`)lastTime=performance.now()expect(delta).toBeGreaterThan(1_000)}})
The AsyncIterator returned by Bun.$(...).lines() should iterate as lines are written rather than being buffered. Had to revert to old Node APIs with callbacks, thought it was my bug.
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.1.41-canary.29+b8f28ed8a
What platform is your computer?
Darwin 24.1.0 arm64 arm
What steps can reproduce the bug?
Repro test: https://github.com/ctjlewis/bun-stream-lines (index.test.ts).
What is the expected behavior?
The
AsyncIterator
returned byBun.$(...).lines()
should iterate as lines are written rather than being buffered. Had to revert to old Node APIs with callbacks, thought it was my bug.The text was updated successfully, but these errors were encountered: