Skip to content

Commit 93ba168

Browse files
committed
extend test for WebKit: goto loads stuff
Test: "should load stuff after reloading by goto" False positive? Yes Reason for failure: module flag wasn't reset between playwright runs
1 parent 0c40164 commit 93ba168

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/kit/test/apps/basics/src/routes/store/stuff/foo.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<script context="module">
22
let is_first = true;
33
4-
export function load() {
4+
export function load({ url }) {
5+
if (url.searchParams.get('reset')) {
6+
is_first = true;
7+
return {};
8+
}
9+
510
if (is_first) {
611
is_first = false;
712
throw new Error('uh oh');

packages/kit/test/apps/basics/test/test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,6 +1719,7 @@ test.describe.parallel('$app/stores', () => {
17191719
clicknav,
17201720
javaScriptEnabled
17211721
}) => {
1722+
await page.goto('/store/stuff/foo?reset=true');
17221723
const stuff1 = JSON.stringify({ name: 'SvelteKit', value: 789, error: 'uh oh' });
17231724
const stuff2 = JSON.stringify({ name: 'SvelteKit', value: 123, foo: true });
17241725
await page.goto('/store/stuff/www');

0 commit comments

Comments
 (0)