refactor(notification-tests): use vi.mocked instead of type cast in call-order test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -193,7 +193,7 @@ describe('NotificationDropdown', () => {
|
|||||||
it('calls onClose before navigating to /aktivitaeten', async () => {
|
it('calls onClose before navigating to /aktivitaeten', async () => {
|
||||||
const callOrder: string[] = [];
|
const callOrder: string[] = [];
|
||||||
const onClose = vi.fn(() => callOrder.push('close'));
|
const onClose = vi.fn(() => callOrder.push('close'));
|
||||||
(goto as ReturnType<typeof vi.fn>).mockImplementation(() => callOrder.push('goto'));
|
vi.mocked(goto).mockImplementation(() => callOrder.push('goto'));
|
||||||
render(NotificationDropdown, {
|
render(NotificationDropdown, {
|
||||||
props: {
|
props: {
|
||||||
notifications: [],
|
notifications: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user