Skip to content

Commit

Permalink
Create sitemap snapshot with static dates
Browse files Browse the repository at this point in the history
  • Loading branch information
mellevanderlinde committed Nov 30, 2024
1 parent 3c1b20e commit f435af7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/website/__tests__/__snapshots__/components.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -310,23 +310,23 @@ exports[`Match robots 1`] = `
exports[`Match sitemap 1`] = `
[
{
"lastModified": 2024-11-10T11:00:00.000Z,
"lastModified": "2024-01-01T00:00:00.000Z",
"url": "https://mellevanderlinde.com/",
},
{
"lastModified": 2024-11-10T11:00:00.000Z,
"lastModified": "2024-01-01T00:00:00.000Z",
"url": "https://mellevanderlinde.com/blog",
},
{
"lastModified": 2024-11-10T11:00:00.000Z,
"lastModified": "2024-01-01T00:00:00.000Z",
"url": "https://mellevanderlinde.com/projects",
},
{
"lastModified": 2024-11-10T11:00:00.000Z,
"lastModified": "2024-01-01T00:00:00.000Z",
"url": "https://mellevanderlinde.com/work",
},
{
"lastModified": 2024-11-10T11:00:00.000Z,
"lastModified": "2024-01-01T00:00:00.000Z",
"url": "https://mellevanderlinde.com/blog/openid-connect-aws-github",
},
]
Expand Down
4 changes: 4 additions & 0 deletions apps/website/__tests__/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,9 @@ test("Match robots", () => {

test("Match sitemap", () => {
const result = sitemap();
// Change to static date for snapshot
result.forEach((item) => {
item.lastModified = "2024-01-01T00:00:00.000Z";
});
expect(result).toMatchSnapshot();
});

0 comments on commit f435af7

Please sign in to comment.