Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jan 18, 2022
1 parent ceb555c commit 492f169
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
9 changes: 4 additions & 5 deletions packages/kit/test/apps/basics/src/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ export const handle = sequence(
return resolve(request);
},
async ({ request, resolve }) => {
if (request.url.pathname === '/errors/error-in-handle') {
const pathname = request.url.pathname;
if (pathname === '/errors/error-in-handle') {
throw new Error('Error in handle');
}

const response = await resolve(request, {
hydrate:
request.url.pathname !== '/no-hydrate' && request.url.pathname !== '/no-hydrate/no-js',
router:
request.url.pathname !== '/no-router/a' && request.url.pathname !== '/no-hydrate/no-js',
hydrate: pathname !== '/no-hydrate' && pathname !== '/no-hydrate/no-js',
router: pathname !== '/no-router/a' && pathname !== '/no-hydrate/no-js',
ssr: !request.url.pathname.startsWith('/no-ssr')
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
</button>

<a href="/no-router/a">a</a>
<a href="/no-router/b">b</a>
<a href="/no-router/b" rel="external">b</a>

<slot></slot>
<slot></slot>
6 changes: 1 addition & 5 deletions packages/kit/test/apps/basics/src/routes/no-router/a.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
<script context="module">
export const router = false;
</script>

<h1>a</h1>
<h1>a</h1>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<h1>b</h1>
<h1>b</h1>
2 changes: 1 addition & 1 deletion packages/kit/test/apps/basics/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ test.describe.parallel('Nested layouts', () => {
});
});

test.describe.parallel('Page options', () => {
test.describe.parallel('Resolve options', () => {
test('does not hydrate page with hydrate=false', async ({ page, javaScriptEnabled }) => {
await page.goto('/no-hydrate');

Expand Down

0 comments on commit 492f169

Please sign in to comment.