diff options
author | Morgan Roderick <morgan@roderick.dk> | 2018-11-06 15:24:26 +0000 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-11-22 04:45:27 -0800 |
commit | 91748dd89c652939d52f38b94afe9eae4eb8fd5d (patch) | |
tree | f9e073cd648c5b969423ac753fce1a4215fd9701 /test/parallel/test-http-outgoing-internal-headernames-setter.js | |
parent | 070995d5866beb31ee2b64ece90b883674a95b40 (diff) | |
download | android-node-v8-91748dd89c652939d52f38b94afe9eae4eb8fd5d.tar.gz android-node-v8-91748dd89c652939d52f38b94afe9eae4eb8fd5d.tar.bz2 android-node-v8-91748dd89c652939d52f38b94afe9eae4eb8fd5d.zip |
http: change DEP0066 to a runtime deprecation
Change doc-only deprecation for _headers and _headerNames accessors to a
runtime deprecation.
PR-URL: https://github.com/nodejs/node/pull/24167
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'test/parallel/test-http-outgoing-internal-headernames-setter.js')
-rw-r--r-- | test/parallel/test-http-outgoing-internal-headernames-setter.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/parallel/test-http-outgoing-internal-headernames-setter.js b/test/parallel/test-http-outgoing-internal-headernames-setter.js new file mode 100644 index 0000000000..7329076698 --- /dev/null +++ b/test/parallel/test-http-outgoing-internal-headernames-setter.js @@ -0,0 +1,15 @@ +'use strict'; +const common = require('../common'); + +const { OutgoingMessage } = require('http'); + +const warn = 'OutgoingMessage.prototype._headerNames is deprecated'; +common.expectWarning('DeprecationWarning', warn, 'DEP0066'); + +{ + // tests for _headerNames set method + const outgoingMessage = new OutgoingMessage(); + outgoingMessage._headerNames = { + 'x-flow-id': '61bba6c5-28a3-4eab-9241-2ecaa6b6a1fd' + }; +} |