File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
examples/app-vitest-full/tests/nuxt Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -42,21 +42,8 @@ describe('client-side nuxt features', () => {
42
42
it ( 'allows pushing to other pages' , async ( ) => {
43
43
await navigateTo ( '/something' )
44
44
expect ( useNuxtApp ( ) . $router . currentRoute . value . path ) . toEqual ( '/something' )
45
- // It takes a few ticks for the Nuxt useRoute to be updated (as, after suspense resolves,
46
- // we wait for a final hook and then update the injected route object )
47
- const route = useRoute ( )
48
- await new Promise < void > ( resolve => {
49
- const unsub = watch (
50
- ( ) => route . path ,
51
- path => {
52
- if ( path === '/something' ) {
53
- unsub ( )
54
- resolve ( )
55
- }
56
- }
57
- )
58
- } )
59
- expect ( route . path ) . toEqual ( '/something' )
45
+ await nextTick ( )
46
+ expect ( useRoute ( ) . path ) . toEqual ( '/something' )
60
47
} )
61
48
} )
62
49
You can’t perform that action at this time.
0 commit comments