Skip to content

Commit

Permalink
chore: squelch warnings in test suite (#11608)
Browse files Browse the repository at this point in the history
* squelch a bunch of warnings

* another

* fix a flaky test

* squelch console output for migrate tests

---------

Co-authored-by: Rich Harris <[email protected]>
  • Loading branch information
Rich-Harris and Rich-Harris authored Jan 11, 2024
1 parent af5571f commit cb82cb9
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
{#if visible}
<button on:click={toggle}>remove</button>

<!-- svelte-ignore a11y-missing-attribute a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-missing-attribute a11y-click-events-have-key-events a11y-no-static-element-interactions -->
<a on:click={toggle}>remove</a>
{:else}
<button on:click={toggle}>add</button>

<!-- svelte-ignore a11y-missing-attribute a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-missing-attribute a11y-click-events-have-key-events a11y-no-static-element-interactions -->
<a on:click={toggle}>add</a>
{/if}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @type {import('./$types').LayoutServerLoad} */
export function load({ route }) {
return { route };
return {
route: { ...route }
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
<a href="/navigation-lifecycle/before-navigate/prevent-navigation?x=1">self</a>
<a href="https://google.com" target="_blank" rel="noreferrer">_blank</a>
<a href="https://google.de">external</a>
<!-- svelte-ignore a11y-invalid-attribute -->
<a download href="">external</a>
<pre>{times_triggered} {unload} {navigation_type}</pre>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<div style="width:100%; height: 200vh; background-color: goldenrod"></div>
<!-- svelte-ignore a11y-invalid-attribute -->
<p><a href="#">#</a></p>
<p><a href="#top">#top</a></p>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @type {import('./$types').PageServerLoad} */
export function load({ params }) {
return params;
return { ...params };
}
Empty file.
4 changes: 2 additions & 2 deletions packages/kit/test/apps/basics/test/client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -917,11 +917,11 @@ test.describe('goto', () => {
});

test.describe('untrack', () => {
test('untracks server load function', async ({ page }) => {
test('untracks server load function', async ({ page, clicknav }) => {
await page.goto('/untrack/server/1');
expect(await page.textContent('p.url')).toBe('/untrack/server/1');
const id = await page.textContent('p.id');
await page.click('a[href="/untrack/server/2"]');
await clicknav('a[href="/untrack/server/2"]');
expect(await page.textContent('p.url')).toBe('/untrack/server/2');
expect(await page.textContent('p.id')).toBe(id);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"vitest": "^1.0.4"
},
"scripts": {
"test": "vitest run",
"test": "vitest run --silent",
"check": "tsc"
}
}

0 comments on commit cb82cb9

Please sign in to comment.