Skip to content

Commit

Permalink
add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
frontendphil committed Dec 18, 2024
1 parent d7d94ae commit b5fcf7a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { describe, it, vi } from 'vitest'

vi.mock('')

describe('Clear transactions', () => {
it('clears all transactions', async () => {
throw new Error('Fail')
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const ClearTransactions = () => null
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { ClearTransactions as Component } from './ClearTransactions'

export const ClearTransactions = {
path: 'clear-transactions/:newActiveRouteId',
element: <Component />,
}
2 changes: 2 additions & 0 deletions extension/src/panel/pages/$activeRouteId/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { redirect, type RouteObject } from 'react-router'
import { ActiveRoute as Component, loader } from './ActiveRoute'
import { ClearTransactions } from './clear-transactions.$newActiveRouteId'
import { Transactions } from './transactions'

export const ActiveRoute: RouteObject = {
Expand All @@ -9,5 +10,6 @@ export const ActiveRoute: RouteObject = {
children: [
{ path: '', loader: () => redirect('transactions') },
Transactions,
ClearTransactions,
],
}

0 comments on commit b5fcf7a

Please sign in to comment.