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 anonymous closure for test-http-expect-handling.js · nodejs/node@ffb5e5d

File tree

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

‎test/parallel/test-http-expect-handling.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-expect-handling.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const tests = [417, 417];
99
let testsComplete = 0;
1010
let testIdx = 0;
1111

12-
const s = http.createServer(function(req, res) {
12+
const s = http.createServer((req, res) => {
1313
throw new Error('this should never be executed');
1414
});
1515

@@ -34,13 +34,13 @@ function nextTest() {
3434
}));
3535
}
3636

37-
http.get(options, function(response) {
37+
http.get(options, (response) => {
3838
console.log(`client: expected status: ${test}`);
3939
console.log(`client: statusCode: ${response.statusCode}`);
4040
assert.strictEqual(response.statusCode, test);
4141
assert.strictEqual(response.statusMessage, 'Expectation Failed');
4242

43-
response.on('end', function() {
43+
response.on('end', () => {
4444
testsComplete++;
4545
testIdx++;
4646
nextTest();
@@ -50,6 +50,6 @@ function nextTest() {
5050
}
5151

5252

53-
process.on('exit', function() {
53+
process.on('exit', () => {
5454
assert.strictEqual(testsComplete, 2);
5555
});

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.