Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR addresses the issues causing snapshot mismatches in the ics link generator tests. The following changes have been made to ensure the tests pass consistently:
Fixed
DTSTAMP
Property:jest.setSystemTime
and setting a constant date in abeforeAll
block. This prevents theDTSTAMP
property from changing with every test run.Stable
UID
Property:Math.random
to return a consistent value during tests. This ensures theUID
property remains the same across test runs, resolving issues with snapshot testing.Consistent Line Endings:
%0D%0A
for CRLF) in alignment with the changes made in PR #553. This ensures the generated ics links match the expected format in the snapshots.Included Missing
PRODID
Property:PRODID
property, reflecting the latest structure of the ics links.Changes Made:
describe
Blocks:describe
block for better organization and clarity. This helps in identifying which test failed and which service it relates to.Testing:
npm test
to verify that all snapshot tests pass with the new configurations.DTSTAMP
, consistentUID
, correct line endings, and includedPRODID
.