Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
squash: windows fix
  • Loading branch information
LiviaMedeiros committed Jun 10, 2025
commit b84f971d3a671232ae87758f053b64ba293df2ff
7 changes: 4 additions & 3 deletions test/parallel/test-config-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ const { test, it, describe } = require('node:test');
const { chmodSync, constants } = require('node:fs');
const common = require('../common');

const isRoot = process.getuid() === 0;

test('should handle non existing json', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-config-file',
Expand Down Expand Up @@ -363,7 +361,10 @@ test('should override node.config.json when specificied', async () => {
strictEqual(result.code, 0);
});
// Skip on windows because it doesn't support chmod changing read permissions
test('should throw an error when the file is non readable', { skip: common.isWindows || isRoot }, async () => {
// Also skip if user is root because it would have read permissions anyway
test('should throw an error when the file is non readable', {
skip: common.isWindows || process.getuid() === 0,
}, async () => {
chmodSync(fixtures.path('rc/non-readable/node.config.json'), constants.O_RDONLY);
const result = await spawnPromisified(process.execPath, [
'--no-warnings',
Expand Down
Loading