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

test: fix todos #20319

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
1 change: 0 additions & 1 deletion test/parallel/test-cluster-http-pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ if (cluster.isMaster) {
http.createServer(common.mustCall((req, res) => {
assert.strictEqual(req.connection.remoteAddress, undefined);
assert.strictEqual(req.connection.localAddress, undefined);
// TODO common.PIPE?

res.writeHead(200);
res.end('OK');
Expand Down
21 changes: 9 additions & 12 deletions test/parallel/test-fs-error-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,21 +636,18 @@ if (!common.isAIX) {
);
}

// copyFile with invalid flags
// Check copyFile with invalid flags.
{
const validateError = (err) => {
assert.strictEqual(err.message,
'EINVAL: invalid argument, copyfile ' +
`'${existingFile}' -> '${nonexistentFile}'`);
assert.strictEqual(err.errno, uv.UV_EINVAL);
assert.strictEqual(err.code, 'EINVAL');
assert.strictEqual(err.syscall, 'copyfile');
return true;
const validateError = {
message: 'EINVAL: invalid argument, copyfile ' +
`'${existingFile}' -> '${nonexistentFile}'`,
errno: uv.UV_EINVAL,
code: 'EINVAL',
syscall: 'copyfile'
};

// TODO(joyeecheung): test fs.copyFile() when uv_fs_copyfile does not
// keep the loop open when the flags are invalid.
// See https://github.com/libuv/libuv/pull/1747
fs.copyFile(existingFile, nonexistentFile, -1,
common.expectsError(validateError));

assert.throws(
() => fs.copyFileSync(existingFile, nonexistentFile, -1),
Expand Down
2 changes: 0 additions & 2 deletions test/parallel/test-util-isDeepStrictEqual.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,6 @@ notUtilIsDeepStrict([1, , , 3], [1, , , 3, , , ]);
const err3 = new TypeError('foo1');
notUtilIsDeepStrict(err1, err2, assert.AssertionError);
notUtilIsDeepStrict(err1, err3, assert.AssertionError);
// TODO: evaluate if this should throw or not. The same applies for RegExp
// Date and any object that has the same keys but not the same prototype.
notUtilIsDeepStrict(err1, {}, assert.AssertionError);
}

Expand Down