properly create temp directories in /tmp folder

This commit is contained in:
Joe Danziger
2025-06-04 13:49:12 -04:00
parent 2219aa3d61
commit 4332d3e269

View File

@@ -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');