xeruf
5b3a47a122
test: run tests and keep assets in subdirectory
2024-11-07 10:20:56 +01:00
Ryan Mwangi
6c9fb1139f
fix(tests): ensure calendar file path is correct
...
- Updated file path in merge date-based calendar test to point to the 'calendar' directory within TEST_MERGED_CALENDARS_DIR.
2024-11-07 03:44:11 +03:00
xeruf
2a9af9c1d5
test: rearrange test directories
...
WIP - need to adjust code to use proper working directory
2024-11-06 20:58:29 +01:00
Ryan Mwangi
8a522377c8
fix: Improve cleanup process in test suite
...
- Ensured the server is properly closed before executing cleanup.
- Added a delay to allow for the release of any lingering file handles.
- Enhanced the cleanup logic to safely remove the merged calendars directory after tests.
- Prevented potential EBUSY errors during directory removal.
2024-11-06 15:23:30 +03:00
Ryan Mwangi
488106b299
test: Change the working directory to the test-specific directory
2024-11-06 15:03:34 +03:00
Ryan Mwangi
e8dbc7a0b4
test: Isolate test environment by setting a temporary merged calendars directory
2024-11-06 15:01:33 +03:00
Ryan Mwangi
d6a470237c
feat(tests): implement whole output testing for calendar merging API
2024-11-05 16:02:59 +03:00
Ryan Mwangi
19af32da10
test(calendar.test.js): lead expected output
2024-11-05 15:57:10 +03:00
Ryan Mwangi
6d4944991c
revert(tests): undo updates to URL assertions in calendar merging API tests
2024-11-05 15:30:41 +03:00
Ryan Mwangi
6bd83a7a56
fix(tests): update URL assertions in calendar merging API tests
2024-11-05 15:26:13 +03:00
Ryan Mwangi
a2468b7dfb
test(calendar.test.js):set us snapshot testing
2024-11-05 15:19:34 +03:00
Ryan Mwangi
996623b3d7
test (calendar.test.js): Add logging
2024-11-05 14:32:53 +03:00
Ryan Mwangi
54d3a35c43
test (calendar.test.js): Check if the file was created in the test directory
2024-11-05 13:43:22 +03:00
Ryan Mwangi
e44f8bf474
test (calendar.test.js): clean up TEST_MERGED_CALENDARS_DIR
2024-11-05 13:33:56 +03:00
Ryan Mwangi
0fc02c579d
test(calendar.test.js):Ensure the test merged calendars directory exists
2024-11-04 21:21:58 +03:00
Ryan Mwangi
b7a419f9cb
test(calendar.test.js):Set environment variable for the test directory
2024-11-04 21:20:33 +03:00
xeruf
d113975ef1
Formatting adjustment in tests
2024-11-04 16:35:10 +01:00
Ryan Mwangi
f67594e072
update other offline calendar for time based events
2024-11-04 15:35:14 +03:00
Ryan Mwangi
3f3766138e
update test calendars for calendars with the overide checked
2024-11-04 13:33:35 +03:00
Ryan Mwangi
910ffddddd
update test calendars for calendars without a prefix
2024-11-04 13:32:10 +03:00
Ryan Mwangi
4142728d19
update test calendars for time based calendar
2024-11-04 13:30:08 +03:00
Ryan Mwangi
7f15fed11f
add offline test calendars for time based calendar tests
2024-11-04 13:27:34 +03:00
Ryan Mwangi
ba3c3c86ba
edit syntax in Merge time-based calendar in calendar.test.js
2024-11-04 13:23:47 +03:00
Ryan Mwangi
8a0a5ce036
update test calendar for US_holidays in date based calendars
2024-11-04 13:21:25 +03:00
Ryan Mwangi
91f86c3f3e
update test calendar for date based calendar
2024-11-04 13:20:05 +03:00
Ryan Mwangi
83ea893da0
load offline calender files
2024-11-04 13:12:44 +03:00
Ryan Mwangi
d2c42836b9
define TEST_CALENDAR_DIR in calendar.test.js
2024-11-04 13:10:43 +03:00
Ryan Mwangi
b810b35673
remove ical-generator import in calendar.test.js
2024-11-04 13:09:34 +03:00
Ryan Mwangi
6eb9d29d44
make tests to run on calendar directory
2024-10-31 15:46:44 +03:00
Ryan Mwangi
c4e77ccc4d
add calendar link to time based event test
2024-10-31 15:43:13 +03:00
Ryan Mwangi
5b24f1b016
add calendar link to date based event test
2024-10-31 15:41:08 +03:00
Ryan Mwangi
88ab9c53a1
add logging to ensure file creation logic is working
2024-10-31 15:24:02 +03:00
Ryan Mwangi
5608a73e3d
remove directory with rmSync other than depricated rmdirSync
2024-10-30 15:46:20 +03:00
Ryan Mwangi
3d82d61661
fix syntax error
2024-10-30 15:00:20 +03:00
Ryan Mwangi
adb29222ca
stop the server after test
2024-10-30 14:56:38 +03:00
Ryan Mwangi
ab02271245
check if the merged calendars directory exists befor cleaning it up after tests
2024-10-30 14:55:41 +03:00
Ryan Mwangi
a61ae491fa
test listen on available port
2024-10-30 14:54:19 +03:00
Ryan Mwangi
bed191c7b7
declare server variable
2024-10-30 14:23:44 +03:00
Ryan Mwangi
11c60cdf38
run the tests in seperate directory
2024-10-30 14:05:17 +03:00
Ryan Mwangi
3d5f2157a2
make arrow function async
2024-10-30 14:03:00 +03:00
Ryan Mwangi
ed8e3d214c
create jest config file
2024-10-30 14:00:02 +03:00
Ryan Mwangi
c652dbaeb9
Start the server before running the tests and ensure it listens on an available port.
2024-10-30 13:58:05 +03:00
Ryan Mwangi
e02f797b46
import app from server.js
2024-10-29 21:51:24 +03:00
Ryan Mwangi
3920fe5064
set up test for calendars with the overide checked
2024-10-29 21:46:40 +03:00
Ryan Mwangi
f2888808ec
set up test for calendars with a prefix
2024-10-29 21:45:09 +03:00
Ryan Mwangi
45c2143a9b
set up test for time based events
2024-10-29 21:43:11 +03:00
Ryan Mwangi
4311619f64
Check if the file was created
2024-10-29 21:40:57 +03:00
Ryan Mwangi
8650d91edb
set up response status
2024-10-29 21:35:41 +03:00
Ryan Mwangi
728c73b23d
set up test for date based calendar
2024-10-29 21:34:45 +03:00
Ryan Mwangi
b5a692b47c
create async function for the tests
2024-10-29 21:33:03 +03:00