mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-26 21:53:06 +00:00
OH10: mock useRouter in cell overlay unit tests
Advisors hybrid conflict path needs next/navigation; overlay container specs render without the App Router. Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
This commit is contained in:
parent
daeff53bf4
commit
13793e3092
1 changed files with 8 additions and 0 deletions
|
|
@ -13,6 +13,14 @@ import { MunicipalityPortfolioCell } from '@/components/campaign/shared/Municipa
|
|||
import { TooltipProvider } from '@/components/ui/tooltip'
|
||||
import { toVoteEstimateScenarioViewModel } from '@/lib/voteEstimate'
|
||||
|
||||
vi.mock('next/navigation', () => ({
|
||||
useRouter: () => ({
|
||||
refresh: vi.fn(),
|
||||
push: vi.fn(),
|
||||
replace: vi.fn(),
|
||||
}),
|
||||
}))
|
||||
|
||||
/**
|
||||
* B42: the quick-edit cells of `/campanha/municipios` share one container
|
||||
* (`CampaignCellEditOverlay`) that is a Popover in the desktop table and a
|
||||
|
|
|
|||
Loading…
Reference in a new issue