forked from ryanmwangi/CalMerger
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:
parent
488106b299
commit
f5ff331f2f
|
@ -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}`);
|
||||
|
||||
|
|
Loading…
Reference in New Issue