GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: replace console.error() with debuglog calls · nodejs/node@e01d061

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-http-information-processing.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-http-information-processing.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-information-processing.js
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
require('../common');
33
const assert = require('assert');
44
const http = require('http');
5+
const debug = require('util').debuglog('test');
56

67
const testResBody = 'other stuff!\n';
78
const kMessageCount = 2;
89

910
const server = http.createServer((req, res) => {
1011
for (let i = 0; i < kMessageCount; i++) {
11-
console.error(`Server sending informational message #${i}...`);
12+
debug(`Server sending informational message #${i}...`);
1213
res.writeProcessing();
1314
}
14-
console.error('Server sending full response...');
15+
debug('Server sending full response...');
1516
res.writeHead(200, {
1617
'Content-Type': 'text/plain',
1718
'ABCD': '1'
@@ -25,7 +26,7 @@ server.listen(0, function() {
2526
path: '/world'
2627
});
2728
req.end();
28-
console.error('Client sending request...');
29+
debug('Client sending request...');
2930

3031
let body = '';
3132
let infoCount = 0;
@@ -40,7 +41,7 @@ server.listen(0, function() {
4041
res.setEncoding('utf8');
4142
res.on('data', function(chunk) { body += chunk; });
4243
res.on('end', function() {
43-
console.error('Got full response.');
44+
debug('Got full response.');
4445
assert.strictEqual(body, testResBody);
4546
assert.ok('abcd' in res.headers);
4647
server.close();

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.