Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.12.0 proposal #16263

Merged
merged 128 commits into from
Nov 7, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
e31ab7c
inspector: enable --inspect-brk
refack Apr 24, 2017
a7d4cad
crypto: add sign/verify support for RSASSA-PSS
tniessen Mar 5, 2017
4917d8c
assert: improve assert.fail() API
Trott Apr 9, 2017
44cc39d
tools: remove assert.fail() lint rule
Trott Apr 12, 2017
1091b86
test: remove common.fail()
Trott Apr 9, 2017
d8f5637
test: add cwd ENOENT known issue test
cjihrig Apr 11, 2017
02b4684
repl: force editorMode in .load
lance Aug 16, 2017
9ec87dc
doc: fix the description of 'close' event
MylesBorins Oct 12, 2017
2d3e735
deps: V8: backport e560815 from upstream
ofrobots Oct 10, 2017
16802c0
process: add --redirect-warnings command line argument
jasnell Dec 4, 2016
68f698c
src: use SafeGetenv() for NODE_REDIRECT_WARNINGS
sam-github Oct 10, 2017
8f42148
src: use a std::vector for preload_modules
sam-github Apr 5, 2017
dd6ea89
src: allow CLI args in env with NODE_OPTIONS
sam-github Feb 20, 2017
12b66e6
src: whitelist new options for NODE_OPTIONS
sam-github May 12, 2017
16f8f9b
src: allow --tls-cipher-list in NODE_OPTIONS
sam-github May 23, 2017
ba830f0
test: chdir before running test-cli-node-options
danbev Apr 26, 2017
dd946c3
test: add hasCrypto check to test-cli-node-options
danbev Apr 27, 2017
cccf5a6
src: --abort-on-uncaught-exception in NODE_OPTIONS
sam-github Jun 26, 2017
1de0490
fs: Fix default params for fs.write(Sync)
papandreou May 23, 2017
c9d440e
test: change == to === in crypto test
fcampinho Apr 13, 2017
7b9710d
test: add inspect-brk option to cluster module
dave-k Apr 19, 2017
d25dc79
test: skipIfInspectorDisabled cluster-inspect-brk
danbev Apr 30, 2017
3265840
deps: upgrade libuv to 1.12.0
cjihrig May 30, 2017
3ac7690
gitignore: add libuv book and GitHub template
cjihrig Jun 5, 2017
a38755d
deps: upgrade libuv to 1.13.1
cjihrig Jul 6, 2017
08d6830
deps: upgrade libuv to 1.14.1
cjihrig Sep 6, 2017
4030c7e
test: update windows module load error message
cjihrig Aug 20, 2017
a0b3805
doc: make socket IPC examples more robust
cjihrig May 24, 2017
f87a626
path: fix normalize on directories with two dots
targos Jul 6, 2017
06ee10e
test: split path tests into multiple files
targos Aug 30, 2017
5c99fc3
test: backward compatible api for tty
gergelyke Sep 7, 2017
f49feab
timers: clarify lib/timer.js comment
danbev Jan 26, 2017
5522bdf
benchmark: use smaller n value in some http tests
psmarshall Jun 30, 2017
0b5798b
src: remove outdated todo from node_crypto.cc
barnski Aug 30, 2017
ab014d4
doc: make mkdtemp example work on Windows
bzoz Sep 14, 2017
48943e9
test: allow adding known-globals through ENV
refack Sep 4, 2017
ae111c2
doc: use consistent terminology in process doc
Trott Sep 10, 2017
6fe61d6
test: remove invalid test
Trott Sep 10, 2017
0b2d548
doc: fix "added in" for Buffer.allocUnsafeSlow()
tuananh Sep 11, 2017
988eec3
doc: update README with SHASUMS256.txt.sig info
maclover7 Aug 31, 2017
21dec55
doc: update AUTHORS list
targos Sep 4, 2017
713f239
doc: adding sebdeckers to collaborators
sebdeckers Sep 12, 2017
9cebe82
test: check inspect array with empty string key
mrahul17 Sep 8, 2017
10a7035
crypto: fix Node_SignFinal
davidben Sep 9, 2017
c4b06b2
test: remove random timer in test-tls-fast-writing
Trott Sep 1, 2017
514ef74
test: make test-http-agent-maxsockets robust
Trott Sep 5, 2017
ccdc194
doc: fix some internal links
vsemozhetbyt Oct 17, 2017
96a64af
test: use reserved invalid hostname for tests
icarter09 Aug 12, 2017
6c9a9ff
build: don't fail `make test` on source tarballs
gibfahn Sep 16, 2017
377f7b9
doc: fix 'aborted' event documentation
lpinca Sep 19, 2017
1483ebd
test: improve readline test coverage for tty
claudiorodriguez Mar 27, 2017
f22132e
deps: v8: fix potential segfault in profiler
ofrobots Sep 20, 2017
81236d9
src: correct typo in trace_event header
danbev Sep 24, 2017
323edfa
docs: clarify usage cli options -e,-p on windows
lukaszewczak Sep 23, 2017
b622a51
doc: ctc -> tsc in collab guide
bengl Sep 24, 2017
d1bf8ce
path: fix normalize paths ending with two dots
targos Sep 26, 2017
27af0bb
url: change variable name to be more descriptive
jason9693 Sep 22, 2017
4669570
crypto: only try to set FIPS mode if different
gibfahn Apr 4, 2017
eefa0a2
doc: retire bnoordhuis from the TSC
bnoordhuis Sep 26, 2017
b166837
src,etw: fix event 9 on 64 bit Windows
joaocgreis Sep 22, 2017
78dc928
build: fix shared installing target
yorkie Sep 2, 2017
6b08128
crypto: use SSL_SESSION_get_id
davidben Sep 11, 2017
af63b38
crypto: use X509V3_EXT_d2i
davidben Sep 11, 2017
f29f20f
doc: add bmeurer to collaborators
bmeurer Sep 29, 2017
926b46c
doc: update libuv license
TimothyGu Sep 28, 2017
02e4303
deps: upgrade libuv to 1.15.0
cjihrig Oct 2, 2017
af18632
doc: fix links in some intra-repository docs
vsemozhetbyt Sep 29, 2017
e865fcb
doc: edit COLLABORATORS_GUIDE.md for readability
Trott Sep 26, 2017
e3ea2a4
test: check that this != new.target in addon
bnoordhuis Sep 29, 2017
6b1ce97
doc: fix dead link in doc/releases.md
lpinca Oct 2, 2017
6d41c85
doc: alphabetize TSC Emeriti in README.md
Trott Oct 2, 2017
62ea82b
doc: add 'git clean -xfd' to backport guide
lance Oct 1, 2017
ddee71a
doc: fix typo in tls.md
koh110 Oct 2, 2017
83a2513
test: skip test if host is too slow
Trott Sep 29, 2017
eaec35d
doc: fix incorrect vm.createContext usage
tshemsedinov Oct 7, 2017
931addb
src: fix ^ in stack trace with vm's columnOffset
TimothyGu Oct 4, 2017
968cc44
test: remove messages in assert.strictEqual
Saeed-Navarik Oct 6, 2017
291b9c5
doc: update style guide for markdown extension
Trott Oct 5, 2017
36747ee
test: alter assert.strictEqual to default message
gishmel Oct 6, 2017
f9cb428
test: replacing assert message with template
Oct 6, 2017
a93d3eb
test: improve assert messages
ericljpemberton Oct 6, 2017
5472173
doc: add clearer setup description
craftninja Oct 6, 2017
f954536
test: replace literal with template string
brantphoto Oct 6, 2017
705202d
tools: use template literals
sarahmeyer Oct 6, 2017
fcab2c5
test: removed string from assert message arg
dpaulino Oct 6, 2017
1c1312e
test: changes to use template literal
joanne-jjb Oct 6, 2017
f8bc5ab
test: remove literal error messages
fyesoft Oct 6, 2017
4a664ce
test: changed buffer-zero output
garlicbrie Oct 6, 2017
1690746
test: display better error message for assertion
SgtPooki Oct 6, 2017
ad69a65
test: replaced literals in errors with templates
domrein Oct 6, 2017
699cfa1
doc: fix macosx-firewall suggestion BUILDING
Suraiya-Hameed Oct 6, 2017
23e66ed
test: improve an error message
pomerantsev Oct 6, 2017
d0bd56d
test: remove message from asserts
justin0022 Oct 6, 2017
f831744
test: improve asset msg in test
genewoo Oct 6, 2017
4243903
test: replace string concatenation with template
robtpaton Oct 6, 2017
bce1f38
test: add NODE_UNIQUE_ID value to err message
danielelisi Oct 6, 2017
cd57d2d
test: replace error msg w/ template literal
sashimii Oct 6, 2017
40a98d6
test: assert.strictEqual using template literals
jmcgui05 Oct 9, 2017
6eb88a4
test: updated error message
craftninja Oct 6, 2017
342ac9f
test: cleanup test-buffer-sharedarraybuffer
RafLeszczynski Oct 6, 2017
ab7f43a
test: include expected result in error messages
keywordnew Oct 6, 2017
15ae5a4
tools: replace concat with template literals
Oct 6, 2017
da160cf
doc: mention collaboration summit in onboarding.md
joyeecheung Oct 8, 2017
c64603f
doc: add kfarnung to collaborators
kfarnung Oct 9, 2017
58509ec
test: clarify assert messages in crypto tests
cpandrews8 Oct 6, 2017
3ad6a9d
test: remove assert message
johenry Oct 6, 2017
2409db6
tools: replace concatenation with string templates
Ethan-Arrowood Oct 6, 2017
cdba989
src: replace manual memory mgmt with std::string
bnoordhuis Oct 5, 2017
88b9572
tty: require readline at top of file
bengl Sep 28, 2017
1fdbaed
test: begin normalizing fixtures use
jasnell Jul 17, 2017
f1eda4a
doc: fix external links with 404 status
vsemozhetbyt Oct 18, 2017
1898779
test: move test-cluster-debug-port to sequential
Oleksandr-Kushchak-i2 Oct 18, 2017
252d08a
build: use generic names for linting tasks
seishun Sep 8, 2017
6e06d0e
doc: add callback function signatures in fs.md
matejkrajcovic Jun 2, 2017
37b9372
doc: fix types and description for dns.resolveTxt
tniessen Sep 19, 2017
e0c4f0b
test,process: run 'abort' suite on Windows
refack Aug 28, 2017
b0fadbe
doc: fix typo in zlib.md
lpinca Oct 25, 2017
8386ce7
deps: upgrade openssl sources to 1.0.2m
shigeki Nov 2, 2017
265d948
deps: copy all openssl header files to include dir
shigeki Nov 2, 2017
7b93a2f
deps: fix openssl assembly error on ia32 win32
indutny Jan 8, 2014
ef57db8
deps: fix asm build error of openssl in x86_win32
Feb 13, 2015
880fba9
openssl: fix keypress requirement in apps on win32
Feb 17, 2015
5da4ceb
deps: add -no_rand_screen to openssl s_client
May 27, 2015
748d3e5
deps: update openssl asm and asm_obsolete files
shigeki Nov 2, 2017
0f3901a
doc: standardize function param/object prop style
gibfahn Jun 18, 2017
a776639
doc: add 9.x to version picker and mark 8.x as LTS
Nov 1, 2017
b98fa82
deps: cherry-pick e7f4e9e from upstream libuv
bzoz Nov 3, 2017
c6a2ec5
2017-11-07, Version 6.12.0 'Boron' (LTS)
MylesBorins Oct 17, 2017
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
Prev Previous commit
Next Next commit
test: remove common.fail()
common.fail() was added to paste over issues with assert.fail() function
signature. assert.fail() has been updated to accept a single argument so
common.fail() is no longer necessary.

Backport-PR-URL: #15479
PR-URL: #12293
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Oct 25, 2017
commit 1091b862900d69e340aa17d46ba191a3737d65a6
9 changes: 2 additions & 7 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ process.on('exit', function() {
if (!exports.globalCheck) return;
const leaked = leakedGlobals();
if (leaked.length > 0) {
fail(`Unexpected global(s) found: ${leaked.join(', ')}`);
assert.fail(`Unexpected global(s) found: ${leaked.join(', ')}`);
}
});

Expand Down Expand Up @@ -473,14 +473,9 @@ exports.fileExists = function(pathname) {
}
};

function fail(msg) {
assert.fail(null, null, msg);
}
exports.fail = fail;

exports.mustNotCall = function(msg) {
return function mustNotCall() {
fail(msg || 'function should not have been called');
assert.fail(msg || 'function should not have been called');
};
};

Expand Down
2 changes: 1 addition & 1 deletion test/inspector/inspector-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ TestSession.prototype.sendInspectorCommands = function(commands) {
};
this.sendAll_(commands, () => {
timeoutId = setTimeout(() => {
common.fail(`Messages without response: ${
assert.fail(`Messages without response: ${
Object.keys(this.messages_).join(', ')}`);
}, TIMEOUT);
});
Expand Down
2 changes: 1 addition & 1 deletion test/internet/test-dgram-send-cb-quelches-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function callbackOnly(err) {
}

function onEvent(err) {
common.fail('Error should not be emitted if there is callback');
assert.fail('Error should not be emitted if there is callback');
}

function onError(err) {
Expand Down
2 changes: 1 addition & 1 deletion test/internet/test-dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ TEST(function test_lookup_all_mixed(done) {
else if (isIPv6(ip.address))
assert.strictEqual(ip.family, 6);
else
assert(false);
assert.fail('unexpected IP address');
});

done();
Expand Down
2 changes: 1 addition & 1 deletion test/internet/test-tls-add-ca-cert.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tls.connect(opts, fail).on('error', common.mustCall((err) => {
}));

function fail() {
assert(false, 'should fail to connect');
assert.fail('should fail to connect');
}

// New secure contexts have the well-known root CAs.
Expand Down
5 changes: 3 additions & 2 deletions test/parallel/test-beforeexit-event-exit.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
'use strict';
const common = require('../common');
require('../common');
const assert = require('assert');

process.on('beforeExit', function() {
common.fail('exit should not allow this to occur');
assert.fail('exit should not allow this to occur');
});

process.exit();
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-fork-and-spawn.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ switch (process.argv[2] || '') {
case 'spawn':
break;
default:
common.fail();
assert.fail();
}

function checkExit(statusCode) {
Expand Down
3 changes: 1 addition & 2 deletions test/parallel/test-child-process-stdout-flush-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ if (process.argv[2] === 'child') {

child.stderr.setEncoding('utf8');
child.stderr.on('data', function(data) {
console.log('parent stderr: ' + data);
assert.ok(false);
assert.fail(`Unexpected parent stderr: ${data}`);
});

// check if we receive both 'hello' at start and 'goodbye' at end
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-cluster-send-handle-twice.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (cluster.isMaster) {
setTimeout(function() { client.end(); }, 50);
}).on('error', function(e) {
console.error(e);
common.fail('server.listen failed');
assert.fail('server.listen failed');
cluster.worker.disconnect();
});
}
11 changes: 6 additions & 5 deletions test/parallel/test-domain-uncaught-exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,16 @@ if (process.argv[2] === 'child') {
test.expectedMessages.forEach(function(expectedMessage) {
if (test.messagesReceived === undefined ||
test.messagesReceived.indexOf(expectedMessage) === -1)
assert(false, `test ${test.fn.name} should have sent message: ${
expectedMessage} but didn't`);
assert.fail('test ' + test.fn.name + ' should have sent message: ' +
expectedMessage + ' but didn\'t');
});

if (test.messagesReceived) {
test.messagesReceived.forEach(function(receivedMessage) {
if (!test.expectedMessages.includes(receivedMessage)) {
assert(false, `test ${test.fn.name} should not have sent message: ${
receivedMessage} but did`);
if (test.expectedMessages.indexOf(receivedMessage) === -1) {
assert.fail('test ' + test.fn.name +
' should not have sent message: ' + receivedMessage +
' but did');
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-event-emitter-add-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ const EventEmitter = require('events');
});

ee.on('hello', hello);
ee.once('foo', common.fail);
ee.once('foo', assert.fail);
assert.deepStrictEqual(['hello', 'foo'], events_new_listener_emited);
assert.deepStrictEqual([hello, common.fail], listeners_new_listener_emited);
assert.deepStrictEqual([hello, assert.fail], listeners_new_listener_emited);

ee.emit('hello', 'a', 'b');
}
Expand Down
12 changes: 6 additions & 6 deletions test/parallel/test-event-emitter-listeners-side-effects.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
require('../common');
const assert = require('assert');

const EventEmitter = require('events').EventEmitter;
Expand All @@ -14,12 +14,12 @@ assert.strictEqual(fl.length, 0);
assert(!(e._events instanceof Object));
assert.deepStrictEqual(Object.keys(e._events), []);

e.on('foo', common.fail);
e.on('foo', assert.fail);
fl = e.listeners('foo');
assert.strictEqual(e._events.foo, common.fail);
assert.strictEqual(e._events.foo, assert.fail);
assert(Array.isArray(fl));
assert.strictEqual(fl.length, 1);
assert.strictEqual(fl[0], common.fail);
assert.strictEqual(fl[0], assert.fail);

e.listeners('bar');

Expand All @@ -28,12 +28,12 @@ fl = e.listeners('foo');

assert(Array.isArray(e._events.foo));
assert.strictEqual(e._events.foo.length, 2);
assert.strictEqual(e._events.foo[0], common.fail);
assert.strictEqual(e._events.foo[0], assert.fail);
assert.strictEqual(e._events.foo[1], assert.ok);

assert(Array.isArray(fl));
assert.strictEqual(fl.length, 2);
assert.strictEqual(fl[0], common.fail);
assert.strictEqual(fl[0], assert.fail);
assert.strictEqual(fl[1], assert.ok);

console.log('ok');
2 changes: 1 addition & 1 deletion test/parallel/test-event-emitter-once.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ e.emit('hello', 'a', 'b');
e.emit('hello', 'a', 'b');

function remove() {
common.fail('once->foo should not be emitted');
assert.fail('once->foo should not be emitted');
}

e.once('foo', remove);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-event-emitter-remove-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ function listener2() {}
const ee = new EventEmitter();

function remove1() {
common.fail('remove1 should not have been called');
assert.fail('remove1 should not have been called');
}

function remove2() {
common.fail('remove2 should not have been called');
assert.fail('remove2 should not have been called');
}

ee.on('removeListener', common.mustCall(function(name, cb) {
Expand Down
3 changes: 2 additions & 1 deletion test/parallel/test-exception-handler2.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';
const common = require('../common');
const assert = require('assert');

process.on('uncaughtException', function(err) {
console.log(`Caught exception: ${err}`);
Expand All @@ -11,4 +12,4 @@ setTimeout(common.mustCall(function() {

// Intentionally cause an exception, but don't catch it.
nonexistentFunc(); // eslint-disable-line no-undef
common.fail('This will not run.');
assert.fail('This will not run.');
2 changes: 1 addition & 1 deletion test/parallel/test-fs-stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fs.open('.', 'r', undefined, common.mustCall(function(err, fd) {
try {
stats = fs.fstatSync(fd);
} catch (err) {
common.fail(err);
assert.fail(err);
}
if (stats) {
console.dir(stats);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-write-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ common.refreshTmpDir();
const stream = fs.createWriteStream(file);

stream.on('drain', function() {
common.fail('\'drain\' event must not be emitted before ' +
assert.fail('\'drain\' event must not be emitted before ' +
'stream.write() has been called at least once.');
});
stream.destroy();
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-global-console-exists.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

'use strict';

const common = require('../common');
require('../common');
const assert = require('assert');
const EventEmitter = require('events');
const leak_warning = /EventEmitter memory leak detected\. 2 hello listeners/;
Expand All @@ -26,7 +26,7 @@ process.stderr.write = (data) => {
if (write_calls === 0)
assert.ok(leak_warning.test(data));
else
common.fail('stderr.write should be called only once');
assert.fail('stderr.write should be called only once');

write_calls++;
};
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http-createConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const server = http.createServer(common.mustCall(function(req, res) {
res.resume();
fn = common.mustCall(createConnectionError);
http.get({ createConnection: fn }, function(res) {
common.fail('Unexpected response callback');
assert.fail('Unexpected response callback');
}).on('error', common.mustCall(function(err) {
assert.strictEqual(err.message, 'Could not create socket');
server.close();
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http-invalid-path-chars.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const common = require('../common');
require('../common');
const assert = require('assert');
const http = require('http');

Expand All @@ -8,7 +8,7 @@ const theExperimentallyDeterminedNumber = 39;

function fail(path) {
assert.throws(() => {
http.request({ path }, common.fail);
http.request({ path }, assert.fail);
}, expectedError);
}

Expand Down
3 changes: 2 additions & 1 deletion test/parallel/test-http-localaddress-bind-error.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';
const common = require('../common');
const assert = require('assert');
const http = require('http');

const invalidLocalAddress = '1.2.3.4';
Expand All @@ -22,7 +23,7 @@ server.listen(0, '127.0.0.1', common.mustCall(function() {
method: 'GET',
localAddress: invalidLocalAddress
}, function(res) {
common.fail('unexpectedly got response from server');
assert.fail('unexpectedly got response from server');
}).on('error', common.mustCall(function(e) {
console.log(`client got error: ${e.message}`);
server.close();
Expand Down
4 changes: 3 additions & 1 deletion test/parallel/test-http-mutable-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ const s = http.createServer(function(req, res) {
res.setHeader('x-foo', 'keyboard cat');
res.writeHead(200, { 'x-foo': 'bar', 'x-bar': 'baz' });
break;
default:
assert.fail('Unknown test');
}

res.statusCode = 201;
Expand Down Expand Up @@ -120,7 +122,7 @@ function nextTest() {
break;

default:
throw new Error('?');
assert.fail('Unknown test');
}

response.setEncoding('utf8');
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http-response-multi-content-length.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const server = http.createServer((req, res) => {
res.writeHead(200, {'content-length': [1, 2]});
break;
default:
common.fail('should never get here');
assert.fail('should never get here');
}
res.end('ok');
});
Expand All @@ -35,7 +35,7 @@ server.listen(0, common.mustCall(() => {
http.get(
{port: server.address().port, headers: {'x-num': n}},
(res) => {
assert(false, 'client allowed multiple content-length headers.');
assert.fail('client allowed multiple content-length headers.');
}
).on('error', common.mustCall((err) => {
assert(/^Parse Error/.test(err.message));
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http-response-splitting.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
require('../common');
const http = require('http');
const net = require('net');
const url = require('url');
Expand Down Expand Up @@ -38,7 +38,7 @@ const server = http.createServer((req, res) => {
test(res, 200, {'foo': y});
break;
default:
common.fail('should not get to here.');
assert.fail('should not get to here.');
}
if (count === 3)
server.close();
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http-response-status-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ testCases.findByPath = function(path) {
return testCase.path === path;
});
if (matching.length === 0) {
throw 'failed to find test case with path ' + path;
assert.fail(`failed to find test case with path ${path}`);
}
return matching[0];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ server.listen(0, () => {
client.on('data', (data) => {
// Should not get to this point because the server should simply
// close the connection without returning any data.
common.fail('no data should be returned by the server');
assert.fail('no data should be returned by the server');
});
client.on('end', common.mustCall(() => {}));
});
2 changes: 1 addition & 1 deletion test/parallel/test-http-unix-socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ server.listen(common.PIPE, common.mustCall(function() {
}));

req.on('error', function(e) {
common.fail(e.stack);
assert.fail(e.stack);
});

req.end();
Expand Down
3 changes: 2 additions & 1 deletion test/parallel/test-https-localaddress-bind-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const common = require('../common');
if (!common.hasCrypto)
common.skip('missing crypto');

const assert = require('assert');
const fs = require('fs');
const https = require('https');

Expand Down Expand Up @@ -32,7 +33,7 @@ server.listen(0, '127.0.0.1', common.mustCall(function() {
method: 'GET',
localAddress: invalidLocalAddress
}, function(res) {
common.fail('unexpectedly got response from server');
assert.fail('unexpectedly got response from server');
}).on('error', common.mustCall(function(e) {
console.log(`client got error: ${e.message}`);
server.close();
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-net-error-twice.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const srv = net.createServer(function onConnection(conn) {
conn.on('error', function(err) {
errs.push(err);
if (errs.length > 1 && errs[0] === errs[1])
assert(false, 'We should not be emitting the same error twice');
assert.fail('Should not emit the same error twice');
});
conn.on('close', function() {
srv.unref();
Expand Down
Loading