Skip to content

Commit

Permalink
chore: remove retry, it doesn't do anything
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Sep 3, 2024
1 parent 92e5eeb commit 91e6cbd
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions playground/hmr-ssr/__tests__/hmr-ssr.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -939,25 +939,21 @@ test('hmr works for self-accepted module within circular imported files', async
})
})

test(
'hmr should not reload if no accepted within circular imported files',
{ retry: 5 },
async () => {
await setupModuleRunner('/circular/index')
const el = () => hmr('.circular')
expect(el()).toBe(
// tests in the browser check that there is an error, but vite runtime just returns undefined in those cases
'mod-a -> mod-b -> mod-c -> undefined (expected no error)',
)
editFile('circular/mod-b.js', (code) =>
code.replace(`mod-b ->`, `mod-b (edited) ->`),
)
await untilUpdated(
() => el(),
'mod-a -> mod-b (edited) -> mod-c -> undefined (expected no error)',
)
},
)
test('hmr should not reload if no accepted within circular imported files', async () => {
await setupModuleRunner('/circular/index')
const el = () => hmr('.circular')
expect(el()).toBe(
// tests in the browser check that there is an error, but vite runtime just returns undefined in those cases
'mod-a -> mod-b -> mod-c -> undefined (expected no error)',
)
editFile('circular/mod-b.js', (code) =>
code.replace(`mod-b ->`, `mod-b (edited) ->`),
)
await untilUpdated(
() => el(),
'mod-a -> mod-b (edited) -> mod-c -> undefined (expected no error)',
)
})

test('assets HMR', async () => {
await setupModuleRunner('/hmr.ts')
Expand Down

0 comments on commit 91e6cbd

Please sign in to comment.