Skip to content

Commit de896ed

Browse files
committed
Update site map serialize test
1 parent 42d6427 commit de896ed

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/integrations/sitemapSerialize/__tests__/index.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ describe('createSerializeFunction', () => {
109109
).toBeUndefined()
110110
})
111111

112+
it('should exclude print routes after the route rename from pdf to print', () => {
113+
const serialize = createSerializeFunction({
114+
exclude: ['print'],
115+
})
116+
117+
expect(serialize(createSitemapItem('https://example.com/print'))).toBeUndefined()
118+
expect(serialize(createSitemapItem('https://example.com/print/my-article'))).toBeUndefined()
119+
})
120+
112121
it('should handle multiple exclusions', () => {
113122
const serialize = createSerializeFunction({
114123
exclude: ['downloads', 'social-shares', '/articles/demo'],

0 commit comments

Comments
 (0)