Compare commits

..

3 commits

View file

@ -54,7 +54,7 @@ describe('Calendar Merging API', () => {
expect(response.status).toBe(200);
// Check if the file was created in the test directory
const filePath = path.join(CALENDARS_DIR, 'nextcloud-minimal.ics');
// console.log('Checking if file exists at:', filePath);
console.log('Checking if file exists at:', filePath);
expect(fs.existsSync(filePath)).toBe(true);
// Load expected output
@ -82,7 +82,7 @@ describe('Calendar Merging API', () => {
expect(response.status).toBe(200);
// Check if the file was created in the test directory
const filePath = path.join(CALENDARS_DIR, 'google-calendar-minimal.ics');
// console.log('Checking if file exists at:', filePath);
console.log('Checking if file exists at:', filePath);
expect(fs.existsSync(filePath)).toBe(true);
// Load expected output
@ -94,30 +94,30 @@ describe('Calendar Merging API', () => {
});
// test('Preserve date-based calendar', async () => {
// const input = getTestCalendarFilename('US_Holidays.ics');
// const response = await request(server)
// .post('/merge')
// .send({
// linkGroupName: 'US Holidays',
// calendars: [
// {
// url: input,
// prefix: '',
// override: false,
// },
// ],
// });
// expect(response.status).toBe(200);
// // Check if the file was created in the test directory
// const filePath = path.join(CALENDARS_DIR, 'US_Holidays.ics');
// console.log('Checking if file exists at:', filePath);
// expect(fs.existsSync(filePath)).toBe(true);
// // Load expected output and compare
// const expectedOutput = fs.readFileSync(input, 'utf8');
// const actualOutput = fs.readFileSync(filePath, 'utf8');
// expect(actualOutput).toBe(expectedOutput);
// });
test('Preserve date-based calendar', async () => {
const input = getTestCalendarFilename('US_Holidays.ics');
const response = await request(server)
.post('/merge')
.send({
linkGroupName: 'US Holidays',
calendars: [
{
url: input,
prefix: '',
override: false,
},
],
});
expect(response.status).toBe(200);
// Check if the file was created in the test directory
const filePath = path.join(CALENDARS_DIR, 'US_Holidays.ics');
console.log('Checking if file exists at:', filePath);
expect(fs.existsSync(filePath)).toBe(true);
// Load expected output and compare
const expectedOutput = fs.readFileSync(input, 'utf8');
const actualOutput = fs.readFileSync(filePath, 'utf8');
expect(actualOutput).toBe(expectedOutput);
});
// test('Merge date-based calendar', async () => {
// const response = await request(server)