mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
fix: sign release commit and backmerge to develop
This commit is contained in:
@ -11,10 +11,7 @@ export const Footer: React.FC<FooterProps> = (props) => {
|
||||
const { version } = props
|
||||
|
||||
const versionLink = useMemo(() => {
|
||||
if (version !== '0.0.0-development') {
|
||||
return `https://github.com/Divlo/Divlo/releases/tag/v${version}`
|
||||
}
|
||||
return 'https://github.com/Divlo/Divlo/tree/develop'
|
||||
return `https://github.com/Divlo/Divlo/releases/tag/v${version}`
|
||||
}, [version])
|
||||
|
||||
return (
|
||||
|
@ -3,25 +3,10 @@ import { render } from '@testing-library/react'
|
||||
import { Footer } from '../Footer'
|
||||
|
||||
describe('<Footer />', () => {
|
||||
it('should render the version link pointing to the GitHub release', async () => {
|
||||
it('should render', async () => {
|
||||
const version = '1.0.0'
|
||||
const { getByText } = render(<Footer version={version} />)
|
||||
const versionLink = getByText(version) as HTMLAnchorElement
|
||||
expect(getByText('Divlo')).toBeInTheDocument()
|
||||
expect(versionLink).toBeInTheDocument()
|
||||
expect(versionLink.href).toEqual(
|
||||
`https://github.com/Divlo/Divlo/releases/tag/v${version}`
|
||||
)
|
||||
})
|
||||
|
||||
it('should render the version link pointing to the `develop` branch', async () => {
|
||||
const version = '0.0.0-development'
|
||||
const { getByText } = render(<Footer version={version} />)
|
||||
const versionLink = getByText(version) as HTMLAnchorElement
|
||||
expect(getByText('Divlo')).toBeInTheDocument()
|
||||
expect(versionLink).toBeInTheDocument()
|
||||
expect(versionLink.href).toEqual(
|
||||
'https://github.com/Divlo/Divlo/tree/develop'
|
||||
)
|
||||
expect(getByText(version)).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user