1
0
Fork 0

fix: Ensure correct merged calendars directory path based on environment

- Updated MERGED_CALENDARS_DIR to use path.join for consistent path resolution.
- Ensured that the directory is correctly set to 'temp_test_calendar' during tests and 'calendar' in production.
This commit is contained in:
Ryan Mwangi 2024-11-06 15:20:24 +03:00
parent 488106b299
commit f5ff331f2f
1 changed files with 2 additions and 2 deletions

View File

@ -9,9 +9,9 @@ const app = express();
app.use(express.json());
// Determine the merged calendars directory based on the environment
const MERGED_CALENDARS_DIR = process.env.NODE_ENV === 'test'
const MERGED_CALENDARS_DIR = path.join(__dirname, process.env.NODE_ENV === 'test'
? 'temp_test_calendar'
: 'calendar';
: 'calendar');
console.log(`Merged calendars directory: ${MERGED_CALENDARS_DIR}`);