From 63b929ae5566a9057fc2ccf1ece122760d916526 Mon Sep 17 00:00:00 2001 From: James Prevett Date: Tue, 5 Nov 2024 17:35:36 -0600 Subject: [PATCH] Added credentials change to permissions test suite --- tests/fs/permissions.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/fs/permissions.test.ts b/tests/fs/permissions.test.ts index baf81c48..ab662a66 100644 --- a/tests/fs/permissions.test.ts +++ b/tests/fs/permissions.test.ts @@ -1,5 +1,6 @@ import assert from 'node:assert'; import { suite, test } from 'node:test'; +import { credentials } from '../../dist/credentials.js'; import { R_OK, W_OK, X_OK } from '../../dist/emulation/constants.js'; import { join } from '../../dist/emulation/path.js'; import { ErrnoError } from '../../dist/error.js'; @@ -87,5 +88,8 @@ suite('Permissions', () => { assert(stats.hasAccess(R_OK)); } + const copy = { ...credentials }; + Object.assign(credentials, { uid: 1000, gid: 1000, euid: 1000, egid: 1000 }); test('Access controls: /', () => test_item('/')); + Object.assign(credentials, copy); });