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: enforce exit code in `test-http-server-stale-close` · nodejs/node@fdc1e78

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-http-server-stale-close.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-http-server-stale-close.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-server-stale-close.js
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if (process.env.NODE_TEST_FORK_PORT) {
3535
req.write('BAM');
3636
req.end();
3737
} else {
38-
const server = http.createServer(common.mustCallAtLeast((req, res) => {
38+
const server = http.createServer(common.mustCall((req, res) => {
3939
res.writeHead(200, { 'Content-Length': '42' });
4040
req.pipe(res);
4141
assert.strictEqual(req.destroyed, false);
@@ -45,9 +45,13 @@ if (process.env.NODE_TEST_FORK_PORT) {
4545
res.end();
4646
}));
4747
}));
48-
server.listen(0, function() {
49-
fork(__filename, {
48+
server.listen(0, common.mustCall(function() {
49+
const cp = fork(__filename, {
50+
stdio: 'inherit',
5051
env: { ...process.env, NODE_TEST_FORK_PORT: this.address().port }
5152
});
52-
});
53+
cp.once('exit', common.mustCall((code) => {
54+
assert.strictEqual(code, 0);
55+
}));
56+
}));
5357
}

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.