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
|
// Start the server
|
||||||
const port = 3000;
|
const port = 3000;
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
|
if (process.env.NODE_ENV !== 'test') {
|
||||||
console.log(`Server started on port ${port}`);
|
console.log(`Server started on port ${port}`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default app;
|
export default app;
|
Loading…
Add table
Reference in a new issue