fix(ui): update favorite use assertions for optional options param

This commit is contained in:
linshen
2026-04-27 22:00:27 +08:00
parent f034bde2d4
commit 81674ea9ce
2 changed files with 2 additions and 2 deletions

View File

@@ -594,7 +594,7 @@ describe('FavoriteManager', () => {
await wrapper.findAll('.favorite-card-use')[0].trigger('click')
await flushPromises()
expect(useFavorite).toHaveBeenCalledWith(expect.objectContaining({ id: 'favorite-1' }))
expect(useFavorite).toHaveBeenCalledWith(expect.objectContaining({ id: 'favorite-1' }), undefined)
expect(services.favoriteManager.incrementUseCount).not.toHaveBeenCalled()
expect(wrapper.find('.n-drawer').exists()).toBe(false)
})

View File

@@ -239,7 +239,7 @@ describe('FavoritesPage', () => {
await wrapper.find('[data-testid="favorite-library-use"]').trigger('click')
await flushPromises()
expect(actions.useFavorite).toHaveBeenCalledWith(sampleFavorite)
expect(actions.useFavorite).toHaveBeenCalledWith(sampleFavorite, undefined)
wrapper.unmount()
})