diff --git a/test/parallel/test-process-uid-gid.js b/test/parallel/test-process-uid-gid.js index 49086792b9e7b1..dd11a2ec6e089d 100644 --- a/test/parallel/test-process-uid-gid.js +++ b/test/parallel/test-process-uid-gid.js @@ -74,7 +74,7 @@ const oldgid = process.getgid(); try { process.setgid('nobody'); } catch (err) { - if (err.message !== 'setgid group id does not exist') { + if (err.code !== 'ERR_UNKNOWN_CREDENTIAL') { throw err; } process.setgid('nogroup');