Skip to content

Commit 5e09a3d

Browse files
dsinecosBethGriggs
authored andcommitted
test: test process.setuid for bad argument types
Test process.setuid with an object as an argument. An equivalent test exists for process.seteuid. PR-URL: #19703 Fixes: #19591 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 970164f commit 5e09a3d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/parallel/test-process-setuid-setgid.js

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ if (common.isWindows) {
3333
return;
3434
}
3535

36+
assert.throws(() => {
37+
process.setuid({});
38+
}, /^TypeError: setuid argument must be a number or a string$/);
39+
3640
assert.throws(() => {
3741
process.setuid('fhqwhgadshgnsdhjsdbkhsdabkfabkveybvf');
3842
}, /^Error: setuid user id does not exist$/);

0 commit comments

Comments
 (0)