mafintosh / mafintosh/streamx

push(x) after push(null) should cause an error

Open
#45 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
239
Forks
27
Avg merge
27m
Merged PRs (30d)
1

Description

Similarly to #44, the following test currently fails:

```javascript
tape('push after push(null) should cause an error', function (t) {
t.plan(5)
const s = new Readable()
s.on('data', function (data) {
t.equals(data, 'a')
})
s.on('error', function () {
t.pass('stream.push() after EOF')
})
s.on('close', function () {
t.end()
})
t.equals(s.push('a'), true)
t.equals(s.push(null), false)
t.equals(s.push('b'), false)
})
```

Both pushed data statements are passed through and no error like `stream.push() after EOF` as this is an incompatibility to the current Node.js streams and am wondering: is that intentional? should that be documented?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the failing test shown in the issue and compare its push(null) sequence with Node.js stream behavior. Inspect the stream implementation and existing EOF-related tests; done means the intended post-EOF behavior is established and the matching test or documentation is updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.