-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
109 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// https://github.com/darkskyapp/string-hash/blob/master/index.js | ||
export default function hash(str: string): string { | ||
let hash = 5381; | ||
let i = str.length; | ||
|
||
while (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i); | ||
return (hash >>> 0).toString(36); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div>Just a dummy page.</div> |
4 changes: 4 additions & 0 deletions
4
test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<title>Some Title</title> | ||
<link href="/" rel="canonical"> | ||
<meta content="some description" name="description"> | ||
<meta content="some keywords" name="keywords"> |
1 change: 1 addition & 0 deletions
1
test/hydration/samples/head-meta-hydrate-duplicate/_before.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div>Just a dummy page.</div> |
4 changes: 4 additions & 0 deletions
4
test/hydration/samples/head-meta-hydrate-duplicate/_before_head.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<title data-svelte="svelte-1s8aodm">Some Title</title> | ||
<link rel="canonical" href="/" data-svelte="svelte-1s8aodm"> | ||
<meta name="description" content="some description" data-svelte="svelte-1s8aodm"> | ||
<meta name="keywords" content="some keywords" data-svelte="svelte-1s8aodm"> |
5 changes: 5 additions & 0 deletions
5
test/hydration/samples/head-meta-hydrate-duplicate/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default { | ||
test(assert, target, snapshot, component, window) { | ||
assert.equal(window.document.querySelectorAll('meta').length, 2); | ||
} | ||
}; |
8 changes: 8 additions & 0 deletions
8
test/hydration/samples/head-meta-hydrate-duplicate/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<svelte:head> | ||
<title>Some Title</title> | ||
<link rel="canonical" href="/"> | ||
<meta name="description" content="some description"> | ||
<meta name="keywords" content="some keywords"> | ||
</svelte:head> | ||
|
||
<div>Just a dummy page.</div> |
4 changes: 4 additions & 0 deletions
4
test/server-side-rendering/samples/head-meta-hydrate-duplicate/_expected-head.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<title data-svelte="svelte-1s8aodm">Some Title</title> | ||
<link rel="canonical" href="/" data-svelte="svelte-1s8aodm"> | ||
<meta name="description" content="some description" data-svelte="svelte-1s8aodm"> | ||
<meta name="keywords" content="some keywords" data-svelte="svelte-1s8aodm"> |
3 changes: 3 additions & 0 deletions
3
test/server-side-rendering/samples/head-meta-hydrate-duplicate/_expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
|
||
<div>Just a dummy page.</div> |
8 changes: 8 additions & 0 deletions
8
test/server-side-rendering/samples/head-meta-hydrate-duplicate/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<svelte:head> | ||
<title>Some Title</title> | ||
<link rel="canonical" href="/"> | ||
<meta name="description" content="some description"> | ||
<meta name="keywords" content="some keywords"> | ||
</svelte:head> | ||
|
||
<div>Just a dummy page.</div> |
2 changes: 1 addition & 1 deletion
2
test/server-side-rendering/samples/head-multiple-title/_expected-head.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<title>B</title> | ||
<title data-svelte="svelte-1csszk6">B</title> |
2 changes: 1 addition & 1 deletion
2
test/server-side-rendering/samples/head-title/_expected-head.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<title>a custom title</title> | ||
<title data-svelte="svelte-135agoq">a custom title</title> |