Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/parallel/test-http-expect-handling.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const tests = [417, 417];
let testsComplete = 0;
let testIdx = 0;

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

Expand All @@ -34,13 +34,13 @@ function nextTest() {
}));
}

http.get(options, function(response) {
http.get(options, (response) => {
console.log(`client: expected status: ${test}`);
console.log(`client: statusCode: ${response.statusCode}`);
assert.strictEqual(response.statusCode, test);
assert.strictEqual(response.statusMessage, 'Expectation Failed');

response.on('end', function() {
response.on('end', () => {
testsComplete++;
testIdx++;
nextTest();
Expand All @@ -50,6 +50,6 @@ function nextTest() {
}


process.on('exit', function() {
process.on('exit', () => {
assert.strictEqual(testsComplete, 2);
});