From 4332d3e26963a1a71f4d834fdb9d000277cf975f Mon Sep 17 00:00:00 2001 From: Joe Danziger Date: Wed, 4 Jun 2025 13:49:12 -0400 Subject: [PATCH] properly create temp directories in /tmp folder --- tests/unit/profiles/selective-profile-removal.test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/profiles/selective-profile-removal.test.js b/tests/unit/profiles/selective-profile-removal.test.js index c113fc47..769d1636 100644 --- a/tests/unit/profiles/selective-profile-removal.test.js +++ b/tests/unit/profiles/selective-profile-removal.test.js @@ -1,5 +1,6 @@ import fs from 'fs'; import path from 'path'; +import os from 'os'; import { jest } from '@jest/globals'; import { removeProfileRules, @@ -38,7 +39,7 @@ describe('Selective Rules Removal', () => { console.log = jest.fn(); // Create temp directory for testing - tempDir = fs.mkdtempSync(path.join(process.cwd(), 'test-temp-')); + tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'task-master-test-')); // Set up spies on fs methods mockExistsSync = jest.spyOn(fs, 'existsSync');