@@ -3,9 +3,6 @@ const common = require('../common');
3
3
const assert = require ( 'assert' ) ;
4
4
const http = require ( 'http' ) ;
5
5
6
- // Verify that after calling end() on an `OutgoingMessage` (or a type that
7
- // inherits from `OutgoingMessage`), its `writable` property is not set to false
8
-
9
6
const server = http . createServer ( common . mustCall ( function ( req , res ) {
10
7
assert . strictEqual ( res . writable , true ) ;
11
8
assert . strictEqual ( res . finished , false ) ;
@@ -14,7 +11,7 @@ const server = http.createServer(common.mustCall(function(req, res) {
14
11
15
12
// res.writable is set to false after it has finished sending
16
13
// Ref: https://github.com/nodejs/node/issues/15029
17
- assert . strictEqual ( res . writable , true ) ;
14
+ assert . strictEqual ( res . writable , false ) ;
18
15
assert . strictEqual ( res . finished , true ) ;
19
16
assert . strictEqual ( res . writableEnded , true ) ;
20
17
@@ -32,9 +29,5 @@ server.on('listening', common.mustCall(function() {
32
29
33
30
assert . strictEqual ( clientRequest . writable , true ) ;
34
31
clientRequest . end ( ) ;
35
-
36
- // Writable is still true when close
37
- // THIS IS LEGACY, we cannot change it
38
- // unless we break error detection
39
- assert . strictEqual ( clientRequest . writable , true ) ;
32
+ assert . strictEqual ( clientRequest . writable , false ) ;
40
33
} ) ) ;
0 commit comments