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
streamToPromise does not propagate a read stream error and instead just stalls, causing programs to hang.
Expected behavior
There should be a test that proves that this works
The error should propagate
Additionally, the documentation on the method should be updated to make it clear that the method consumes the stream, holds it in memory, and awaits the stream to finish
Context:
Library Version 7.1.1
Additional context
None
The text was updated successfully, but these errors were encountered:
Failing test case added that shows how the test just hangs:
✕ streamToPromise propagates error on read stream (5001 ms)
● sitemap stream › streamToPromise propagates error on read stream
ENOENT: no such file or directory, open '/var/folders/07/183kkj1d7l59l67s4tq0dmyr0000gn/T/does-not-exist-sitemap.xml'
● sitemap stream › streamToPromise propagates error on read stream
thrown: "Exceeded timeout of 5000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
97 | });
98 |
> 99 | it('streamToPromise propagates error on read stream', async () => {
| ^
100 | await expect(
101 | streamToPromise(
102 | createReadStream(resolve(tmpdir(), `./does-not-exist-sitemap.xml`))
at it (tests/sitemap-stream.test.ts:99:3)
at Object.describe (tests/sitemap-stream.test.ts:17:1)
Describe the bug
streamToPromise
does not propagate a read stream error and instead just stalls, causing programs to hang.Expected behavior
Context:
Additional context
None
The text was updated successfully, but these errors were encountered: