From 0d30848f13a275fce4545d19e52a84e0027c9c0a Mon Sep 17 00:00:00 2001 From: Masashi Hirano Date: Fri, 17 Aug 2018 07:45:55 +0900 Subject: [PATCH] test: add test unknown credential error of process.setgroups Added test to check ERR_UNKNOWN_CREDENTIAL of process.setgroups to increase coverage. PR-URL: https://github.com/nodejs/node/pull/22368 Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen --- test/parallel/test-process-setgroups.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/parallel/test-process-setgroups.js b/test/parallel/test-process-setgroups.js index 60a6e3e32ebe3d..caeed44ea5c410 100644 --- a/test/parallel/test-process-setgroups.js +++ b/test/parallel/test-process-setgroups.js @@ -38,3 +38,10 @@ assert.throws( } ); }); + +assert.throws(() => { + process.setgroups([1, 'fhqwhgadshgnsdhjsdbkhsdabkfabkveyb']); +}, { + name: 'Error', + message: 'group name not found' +});