xref: /third_party/node/test/parallel/test-http-incoming-message-connection-setter.js (revision 1cb0ef41)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ci// Test that the setter for http.IncomingMessage,prototype.connection sets the
41cb0ef41Sopenharmony_ci// socket property too.
51cb0ef41Sopenharmony_cirequire('../common');
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ciconst assert = require('assert');
81cb0ef41Sopenharmony_ciconst http = require('http');
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ciconst incomingMessage = new http.IncomingMessage();
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ciassert.strictEqual(incomingMessage.connection, undefined);
131cb0ef41Sopenharmony_ciassert.strictEqual(incomingMessage.socket, undefined);
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_ciincomingMessage.connection = 'fhqwhgads';
161cb0ef41Sopenharmony_ci
171cb0ef41Sopenharmony_ciassert.strictEqual(incomingMessage.connection, 'fhqwhgads');
181cb0ef41Sopenharmony_ciassert.strictEqual(incomingMessage.socket, 'fhqwhgads');
19

Indexes created Thu Nov 07 10:32:03 CST 2024