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
test: test process.setuid for bad argument types
test process.setuid with an object as an argument. An equivalent test
exists for process.seteuid

Fixes: #19591
  • Loading branch information
dsinecos committed Mar 30, 2018
commit 6bf36f094616fea29156b0cac8da8e23efec706e
4 changes: 4 additions & 0 deletions test/parallel/test-process-setuid-setgid.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ if (common.isWindows) {
return;
}

assert.throws(() => {
process.setuid({});
}, /^TypeError: setuid argument must be a number or a string$/);

assert.throws(() => {
process.setuid('fhqwhgadshgnsdhjsdbkhsdabkfabkveybvf');
}, /^Error: setuid user id does not exist$/);
Expand Down