Skip to content
Source
Sign inSign up
TanStack/router

test(router): make the remount test more thorough #5684

Mergedbirkskyum(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5684/headmerged by birkskyum(GitHub profile, opens in a new tab)

Showing 2 changed files with 16 additions and 0 deletions.

x
0 of 2 viewed, 2 left
8 additions and 0 deletionse2e/react-router/basic-file-based/tests/app.spec.tsModified
View file
@@ -296,6 +296,10 @@
await expect(page.getByTestId('component-mounts')).toContainText(
'Page component mounts: 1',
+ await page.getByRole('button', { name: 'Regenerate search param' }).click()
+ await expect(page.getByTestId('component-mounts')).toContainText(
+ 'Page component mounts: 1',
+ )
​
test('Should remount deps when remountDeps does change ', async ({ page }) => {
@@ -307,4 +311,8 @@
await expect(page.getByTestId('component-mounts')).toContainText(
'Page component mounts: 2',
+ await page.getByRole('button', { name: 'Regenerate search param' }).click()
+ await expect(page.getByTestId('component-mounts')).toContainText(
+ 'Page component mounts: 3',
+ )
8 additions and 0 deletionse2e/solid-router/basic-file-based/tests/app.spec.tsModified
View file