Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
36a85a0
fix(sveltekit): Don't use node apis in cloudflare workers
SG60 Dec 9, 2024
ce93824
fix(sveltekit): provide a handle function to init cloudflare workers …
SG60 Dec 11, 2024
9eec3cf
chore(sveltekit): refactor some common server-side code
SG60 Dec 12, 2024
d68d80c
chore(sveltekit): refactor the rest of the common server-side code
SG60 Dec 12, 2024
6539014
fix(sveltekit): avoid importing fs and path in workers contexts
SG60 Dec 12, 2024
e3e4b61
test(sveltekit-cloudflare-pages): add an e2e test for @sentry/sveltek…
SG60 Dec 17, 2024
355bc22
test(sveltekit-cloudflare): simpler e2e test
SG60 Dec 17, 2024
f6da869
test(sveltekit-cloudflare): rename e2e test dir to tests
SG60 Dec 24, 2024
159426a
test(sveltekit-cloudflare): add test of prerendered page
SG60 Dec 24, 2024
f1e6d73
fix(sveltekit): fix prerender failure when using cloudflare workers
SG60 Dec 24, 2024
728cd95
test(sveltekit): refactor tests to use new server-common folder
SG60 Dec 28, 2024
ed56c93
fix(sveltekit): remove deprecated API usage
SG60 Dec 29, 2024
131f8f6
fix(sveltekit): use the new unified continueTrace function
SG60 Dec 29, 2024
d27fa35
chore(sveltekit): fix formatting and lints
SG60 Jan 21, 2025
a42a8c8
test(sveltekit): fix sveltekit unit tests
SG60 Jan 21, 2025
4c2f4d7
chore(sveltekit): formatting
SG60 Jan 21, 2025
83be44f
avoid double request isolation, add tests
Lms24 Jan 31, 2025
189aa5c
formatting
Lms24 Jan 31, 2025
fee1d2b
cleanup
Lms24 Jan 31, 2025
99b0d15
init SDK configured for CF in dev mode
Lms24 Jan 31, 2025
7ef333d
add renamed file
Lms24 Jan 31, 2025
5c66a56
biome :((
Lms24 Jan 31, 2025
62a1f90
test something
Lms24 Feb 20, 2025
9a82e14
of course biome complains
Lms24 Feb 20, 2025
16548a6
maybe fix tests?
Lms24 Feb 21, 2025
2fd7bcc
replace more npm with pnpm
Lms24 Feb 21, 2025
67b94ef
handle http prerender error
Lms24 Feb 21, 2025
87a8484
maybe a pnpm problem?
Lms24 Feb 21, 2025
b937189
ignore prerender error?
Lms24 Feb 21, 2025
38554d5
does CI pass if I remove the prerendered page?
Lms24 Feb 21, 2025
0f6c1fe
pin wrangler
Lms24 Feb 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(sveltekit-cloudflare): add test of prerendered page
test(sveltekit-cloudflare): actually test the prerendered page
  • Loading branch information
SG60 authored and Lms24 committed Feb 19, 2025
commit 159426a0ce5ad75fd0dca3f8931eeb0261bb7c85
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>

<a href="/prerender-test">prerender test</a>

<p>{data.message}</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { PageServerLoad } from './$types';

export const prerender = true;

export const load: PageServerLoad = async function load() {
return {
message: 'From server load function.',
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script lang="ts">
let { data } = $props();
</script>

<h1>{data.message}</h1>
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ test('home page has expected h1', async ({ page }) => {
await page.goto('/');
await expect(page.locator('h1')).toBeVisible();
});

test('prerendered page has expected h1', async ({ page }) => {
await page.goto('/prerender-test');
await expect(page.locator('h1')).toHaveText('From server load function.');
});