forked from ryanmwangi/CalMerger
ensure server only starts on the server side code when it's not a test
This commit is contained in:
parent
7e04cb2b9a
commit
5583224c33
1 changed files with 3 additions and 1 deletions
|
@ -226,7 +226,9 @@ function saveCalendarData(calendarId, linkGroupName, calendars) {
|
|||
// Start the server
|
||||
const port = 3000;
|
||||
app.listen(port, () => {
|
||||
console.log(`Server started on port ${port}`);
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
console.log(`Server started on port ${port}`);
|
||||
}
|
||||
});
|
||||
|
||||
export default app;
|
Loading…
Add table
Reference in a new issue