test(calendar): remove line ending normalization
This commit is contained in:
parent
c8f3771717
commit
2bd5c967af
|
@ -15,8 +15,6 @@ let server;
|
|||
process.chdir(__dirname)
|
||||
const app = await import('../src/server');
|
||||
|
||||
const normalizeLineEndings = (str) => str.replace(/\r\n/g, '\r\n').trimEnd(); // Normalize to CRLF
|
||||
|
||||
describe('Calendar Merging API', () => {
|
||||
beforeAll(async () => {
|
||||
// Start the server
|
||||
|
@ -63,12 +61,8 @@ describe('Calendar Merging API', () => {
|
|||
const expectedOutput = fs.readFileSync(input, 'utf8');
|
||||
const actualOutput = fs.readFileSync(filePath, 'utf8');
|
||||
|
||||
// Normalize line endings
|
||||
const normalizedActual = normalizeLineEndings(actualOutput);
|
||||
const normalizedExpected = normalizeLineEndings(expectedOutput);
|
||||
|
||||
//compare
|
||||
expect(normalizedActual).toBe(normalizedExpected);
|
||||
expect(actualOutput).toBe(expectedOutput);
|
||||
});
|
||||
|
||||
test('Preserve google calendar', async () => {
|
||||
|
@ -95,12 +89,8 @@ describe('Calendar Merging API', () => {
|
|||
const expectedOutput = fs.readFileSync(input, 'utf8');
|
||||
const actualOutput = fs.readFileSync(filePath, 'utf8');
|
||||
|
||||
// Normalize line endings
|
||||
const normalizedActual = normalizeLineEndings(actualOutput);
|
||||
const normalizedExpected = normalizeLineEndings(expectedOutput);
|
||||
|
||||
//compare
|
||||
expect(normalizedActual).toBe(normalizedExpected);
|
||||
expect(actualOutput).toBe(expectedOutput);
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -13,4 +13,4 @@ UID:6tbrvsitniuu72li7kk15gou2b@google.com
|
|||
SUMMARY:progodessey
|
||||
SEQUENCE:0
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
END:VCALENDAR
|
|
@ -41,4 +41,4 @@ STATUS:CONFIRMED
|
|||
SUMMARY:do
|
||||
TRANSP:OPAQUE
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
END:VCALENDAR
|
|
@ -30,4 +30,4 @@ RRULE:FREQ=WEEKLY;BYDAY=WE
|
|||
SUMMARY:JR Weekly Check-In
|
||||
SEQUENCE:0
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
END:VCALENDAR
|
Loading…
Reference in New Issue