Skip to content

Commit

Permalink
chore: fix snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jul 30, 2023
1 parent ca7cb3d commit 1414e28
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/integration/single/baseUrl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('base', () => {
"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\"?><?xml-stylesheet type=\\"text/xsl\\" href=\\"/base/__sitemap__/style.xsl\\"?>
<urlset xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\" xmlns:video=\\"http://www.google.com/schemas/sitemap-video/1.1\\" xmlns:xhtml=\\"http://www.w3.org/1999/xhtml\\" xmlns:image=\\"http://www.google.com/schemas/sitemap-image/1.1\\" xsi:schemaLocation=\\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.google.com/schemas/sitemap-image/1.1 http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd\\" xmlns=\\"http://www.sitemaps.org/schemas/sitemap/0.9\\">
<url>
<loc>https://nuxtseo.com/base/</loc>
<loc>https://nuxtseo.com/base</loc>
</url>
<url>
<loc>https://nuxtseo.com/base/about</loc>
Expand Down
200 changes: 200 additions & 0 deletions test/unit/parsePages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,76 +9,276 @@ describe('page parser', () => {
[
{
"alternatives": [
{
"href": "/about",
"hreflang": "en",
},
{
"href": "/fr/a-propos",
"hreflang": "fr",
},
{
"href": "/about",
"hreflang": "x-default",
},
],
"loc": "/about",
},
{
"alternatives": [
{
"href": "/about",
"hreflang": "en",
},
{
"href": "/fr/a-propos",
"hreflang": "fr",
},
{
"href": "/about",
"hreflang": "x-default",
},
],
"loc": "/fr/a-propos",
},
{
"alternatives": [
{
"href": "/blog/categories",
"hreflang": "en",
},
{
"href": "/fr/blog/categories",
"hreflang": "fr",
},
{
"href": "/blog/categories",
"hreflang": "x-default",
},
],
"loc": "/blog/categories",
},
{
"alternatives": [
{
"href": "/blog/categories",
"hreflang": "en",
},
{
"href": "/fr/blog/categories",
"hreflang": "fr",
},
{
"href": "/blog/categories",
"hreflang": "x-default",
},
],
"loc": "/fr/blog/categories",
},
{
"alternatives": [
{
"href": "/blog",
"hreflang": "en",
},
{
"href": "/fr/blog",
"hreflang": "fr",
},
{
"href": "/blog",
"hreflang": "x-default",
},
],
"loc": "/blog",
},
{
"alternatives": [
{
"href": "/blog",
"hreflang": "en",
},
{
"href": "/fr/blog",
"hreflang": "fr",
},
{
"href": "/blog",
"hreflang": "x-default",
},
],
"loc": "/fr/blog",
},
{
"alternatives": [
{
"href": "/blog/tags",
"hreflang": "en",
},
{
"href": "/fr/blog/tags",
"hreflang": "fr",
},
{
"href": "/blog/tags",
"hreflang": "x-default",
},
],
"loc": "/blog/tags",
},
{
"alternatives": [
{
"href": "/blog/tags",
"hreflang": "en",
},
{
"href": "/fr/blog/tags",
"hreflang": "fr",
},
{
"href": "/blog/tags",
"hreflang": "x-default",
},
],
"loc": "/fr/blog/tags",
},
{
"alternatives": [
{
"href": "/hidden-path-but-in-sitemap",
"hreflang": "en",
},
{
"href": "/fr/hidden-path-but-in-sitemap",
"hreflang": "fr",
},
{
"href": "/hidden-path-but-in-sitemap",
"hreflang": "x-default",
},
],
"loc": "/hidden-path-but-in-sitemap",
},
{
"alternatives": [
{
"href": "/hidden-path-but-in-sitemap",
"hreflang": "en",
},
{
"href": "/fr/hidden-path-but-in-sitemap",
"hreflang": "fr",
},
{
"href": "/hidden-path-but-in-sitemap",
"hreflang": "x-default",
},
],
"loc": "/fr/hidden-path-but-in-sitemap",
},
{
"alternatives": [
{
"href": "/",
"hreflang": "en",
},
{
"href": "/fr",
"hreflang": "fr",
},
{
"href": "/",
"hreflang": "x-default",
},
],
"loc": "/",
},
{
"alternatives": [
{
"href": "/",
"hreflang": "en",
},
{
"href": "/fr",
"hreflang": "fr",
},
{
"href": "/",
"hreflang": "x-default",
},
],
"loc": "/fr",
},
{
"alternatives": [
{
"href": "/new-page",
"hreflang": "en",
},
{
"href": "/fr/new-page",
"hreflang": "fr",
},
{
"href": "/new-page",
"hreflang": "x-default",
},
],
"loc": "/new-page",
},
{
"alternatives": [
{
"href": "/new-page",
"hreflang": "en",
},
{
"href": "/fr/new-page",
"hreflang": "fr",
},
{
"href": "/new-page",
"hreflang": "x-default",
},
],
"loc": "/fr/new-page",
},
{
"alternatives": [
{
"href": "/secret",
"hreflang": "en",
},
{
"href": "/fr/secret",
"hreflang": "fr",
},
{
"href": "/secret",
"hreflang": "x-default",
},
],
"loc": "/secret",
},
{
"alternatives": [
{
"href": "/secret",
"hreflang": "en",
},
{
"href": "/fr/secret",
"hreflang": "fr",
},
{
"href": "/secret",
"hreflang": "x-default",
},
],
"loc": "/fr/secret",
},
]
`)
})
Expand Down

0 comments on commit 1414e28

Please sign in to comment.