Commit graph

342 commits

Author SHA1 Message Date
88ab9c53a1 add logging to ensure file creation logic is working 2024-10-31 15:24:02 +03:00
3d62557fa3 sanitize linkgroup name to replace spaces with underscores 2024-10-30 16:01:10 +03:00
5608a73e3d remove directory with rmSync other than depricated rmdirSync 2024-10-30 15:46:20 +03:00
5583224c33 ensure server only starts on the server side code when it's not a test 2024-10-30 15:44:16 +03:00
7e04cb2b9a provide another test calendar for date based events 2024-10-30 15:42:14 +03:00
87c4d4686f Ensure that event.start is a string before calling includes. If it's a Date object, convert it to a string using toISOString(). 2024-10-30 15:35:44 +03:00
3d82d61661 fix syntax error 2024-10-30 15:00:20 +03:00
adb29222ca stop the server after test 2024-10-30 14:56:38 +03:00
ab02271245 check if the merged calendars directory exists befor cleaning it up after tests 2024-10-30 14:55:41 +03:00
a61ae491fa test listen on available port 2024-10-30 14:54:19 +03:00
bed191c7b7 declare server variable 2024-10-30 14:23:44 +03:00
11c60cdf38 run the tests in seperate directory 2024-10-30 14:05:17 +03:00
3d5f2157a2 make arrow function async 2024-10-30 14:03:00 +03:00
ed8e3d214c create jest config file 2024-10-30 14:00:02 +03:00
c652dbaeb9 Start the server before running the tests and ensure it listens on an available port. 2024-10-30 13:58:05 +03:00
dcf5c7a4a8 rename jest.config.js to be a common js file 2024-10-30 02:27:39 +03:00
cbd59cd149 create jest config file 2024-10-30 02:25:08 +03:00
207afe1b8e create Babel config file 2024-10-30 02:23:50 +03:00
6be1456c35 install babel to transpile my test code to enable Jest to understand import statements 2024-10-29 23:50:54 +03:00
52b2b8fda5 configure jest 2024-10-29 21:54:59 +03:00
e02b3d4c1b install supertest 2024-10-29 21:54:14 +03:00
e02f797b46 import app from server.js 2024-10-29 21:51:24 +03:00
b86d96b4d6 export app from server.js 2024-10-29 21:49:34 +03:00
3920fe5064 set up test for calendars with the overide checked 2024-10-29 21:46:40 +03:00
f2888808ec set up test for calendars with a prefix 2024-10-29 21:45:09 +03:00
45c2143a9b set up test for time based events 2024-10-29 21:43:11 +03:00
4311619f64 Check if the file was created 2024-10-29 21:40:57 +03:00
8650d91edb set up response status 2024-10-29 21:35:41 +03:00
728c73b23d set up test for date based calendar 2024-10-29 21:34:45 +03:00
b5a692b47c create async function for the tests 2024-10-29 21:33:03 +03:00
6416685de8 Clean up the merged calendars directory after tests 2024-10-29 21:32:00 +03:00
22f0a05bce Ensure the merged calendars directory exists 2024-10-29 21:29:24 +03:00
3ddd563eac define MERGED_CALENDARS_DIR 2024-10-29 21:27:29 +03:00
b810f7c59d import request and express 2024-10-29 21:26:17 +03:00
310a71459d import request and express 2024-10-29 21:24:44 +03:00
fde1a78627 create calendar.test.js for automated tests 2024-10-29 21:23:40 +03:00
94f5aed027 install jest to run automated tests 2024-10-29 21:20:48 +03:00
815cb37cc8 edit date based calendar url 2024-10-29 21:13:14 +03:00
a77279273a for date based events use the date part only in the /calendar/:name endpoint 2024-10-29 15:47:58 +03:00
c6300bd68f for date based events use the date part only 2024-10-29 15:44:49 +03:00
8ba0bae716 add time and date based events as test code in /calendar/:name endpoint 2024-10-29 15:38:50 +03:00
ba597a2556 check if the event is date-based or time-based 2024-10-29 15:32:17 +03:00
67bdba2ee6 add time and date based events as test code 2024-10-29 15:26:45 +03:00
e2d40b3fc5 get rid of the updateMergedCalendars function 2024-10-29 02:36:18 +03:00
7c01cfc964 get rid of end point to refresh merged calender using the refresh button 2024-10-29 02:35:10 +03:00
8031333bce save the calendar to a file 2024-10-29 02:31:58 +03:00
8927cc1cd3 parse calendar data using ical-generator 2024-10-29 02:31:00 +03:00
4310d3f395 create a new iCalendar instance in the calendar/:name end point 2024-10-29 02:29:29 +03:00
a00321c922 update test.ics using ical-generator 2024-10-28 21:03:58 +03:00
4584280eab save the calendar to a file 2024-10-28 20:57:34 +03:00