Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mvadari committed Feb 5, 2025
1 parent 1d90262 commit b40c207
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/containers/Header/test/Search.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { render, screen, cleanup, fireEvent } from '@testing-library/react'
import { I18nextProvider } from 'react-i18next'
import { BrowserRouter as Router } from 'react-router-dom'
import { QueryClientProvider } from 'react-query'
import i18n from '../../../i18n/testConfig'
import { Search } from '../Search'
import * as rippled from '../../../rippled/lib/rippled'
Expand Down
10 changes: 6 additions & 4 deletions src/containers/shared/components/test/DomainLink.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ describe('DomainLink', () => {

it('handles domain link with protocol removal', () => {
const url = 'https://example.com/'
const wrapper = mount(<DomainLink domain={url} keepProtocol={false} />)
expect(wrapper.find('a').props().className).toEqual('domain')
expect(wrapper.find('a').text()).toEqual('example.com')
expect(wrapper.find('a').props().href).toEqual('https://example.com/')
const { container } = render(
<DomainLink domain={url} keepProtocol={false} />,
)
expect(container).toHaveTextContent('example.com')
expect(screen.getByText('example.com')).toHaveAttribute('href', url)
expect(screen.getByText('example.com')).toHaveClass('domain')
})
})

0 comments on commit b40c207

Please sign in to comment.