summaryrefslogtreecommitdiff
path: root/test/parallel/test-stream-transform-final-sync.js
Commit message (Collapse)AuthorAgeFilesLines
* test: adjust comments for upcoming lint ruleRich Trott2020-10-071-49/+49
| | | | | | | | | Enforce `//` for multiline comments. Some tests mixed and matched, and at least one did so in a (to me) surprising way. PR-URL: https://github.com/nodejs/node/pull/35485 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* stream: fix writable.end callback behaviorRobert Nagy2020-07-011-2/+2
| | | | | | | | | Changes so that the end() callback behaves the same way in relation to _final as write() does to _write/_writev. PR-URL: https://github.com/nodejs/node/pull/34101 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* stream: fix _final and 'prefinish' timingRobert Nagy2020-04-221-3/+3
| | | | | | | | | | | | | | | | | | | | This PR fixes a few different things: The timing of 'prefinish' depends on whether or not _final is defined. In on case the event is emitted synchronously with end() and otherwise asynchronously. _final is currently unecessarily called asynchronously which forces implementors to use 'prefinish' as a hack to emulate synchronous behaviour. Furthermore, this hack is subtly broken due to the above issue. Refs: https://github.com/nodejs/node/issues/31401 Refs: https://github.com/nodejs/node/pull/32763#discussion_r407041983 PR-URL: https://github.com/nodejs/node/pull/32780 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: change var to const in parallel/test-stream-transform-final*Kenza Houmani2019-11-151-1/+1
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/30448 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: remove 3rd arg from to assert.strictEqual()hectorcoronado2018-07-181-10/+20
| | | | | | | | | | | | | | prevents AssertionError from reporting string literal, instead displays values of first 2 args passed to assert.strictEqual() PR-URL: https://github.com/nodejs/node/pull/21828 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: fix spelling in test case commentsTobias Nießen2018-01-111-1/+1
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18018 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
* stream: add final methodCalvin Metcalf2017-05-241-0/+100
Adds the ability to for write streams to have an _final method which acts similarly to the _flush method that transform streams have but is called before the finish event is emitted and if asynchronous delays the stream from finishing. The `final` option may also be passed in order to set it. PR-URL: https://github.com/nodejs/node/pull/12828 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>