diff options
author | Robert Nagy <ronagy@icloud.com> | 2019-08-02 08:09:06 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-08-17 00:28:06 -0700 |
commit | 6f613d8abb05619e35c828b665a76215861bbf04 (patch) | |
tree | 18a904d44299c6564c5c83adc0051076f27bb922 /test/parallel/test-http2-compat-serverresponse-finished.js | |
parent | e4bbbcc84bd10be1e9e8e66d42542c70c1a02056 (diff) | |
download | android-node-v8-6f613d8abb05619e35c828b665a76215861bbf04.tar.gz android-node-v8-6f613d8abb05619e35c828b665a76215861bbf04.tar.bz2 android-node-v8-6f613d8abb05619e35c828b665a76215861bbf04.zip |
http,stream: add writableEnded
This is work towards resolving the response.finished confusion and
future deprecation.
Note that implementation-wise, streams have both an ending and ended
state. However, in this case (in order to avoid confusion in user space)
writableEnded is equal to writable.ending. The ending vs ended situation
is internal state required for internal stream logic.
PR-URL: https://github.com/nodejs/node/pull/28934
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/parallel/test-http2-compat-serverresponse-finished.js')
-rw-r--r-- | test/parallel/test-http2-compat-serverresponse-finished.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/parallel/test-http2-compat-serverresponse-finished.js b/test/parallel/test-http2-compat-serverresponse-finished.js index 4da592a5b3..a42d40227c 100644 --- a/test/parallel/test-http2-compat-serverresponse-finished.js +++ b/test/parallel/test-http2-compat-serverresponse-finished.js @@ -25,8 +25,10 @@ server.listen(0, common.mustCall(() => { })); })); assert.strictEqual(response.finished, false); + assert.strictEqual(response.writableEnded, false); response.end(); assert.strictEqual(response.finished, true); + assert.strictEqual(response.writableEnded, true); })); const url = `http://localhost:${port}`; |