mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-12-31 17:17:38 +01:00
fix tests
This commit is contained in:
parent
b0b5060d37
commit
e0d27aa6c1
@ -12,6 +12,7 @@ describe('Repository', () => {
|
||||
it('uses html_url as main link for portfolio & blog', () => {
|
||||
const repo1 = {
|
||||
name: 'portfolio',
|
||||
full_name: 'kremalicious/portfolio',
|
||||
html_url: 'html_url'
|
||||
}
|
||||
|
||||
@ -24,6 +25,7 @@ describe('Repository', () => {
|
||||
it('renders homepage link when provided', () => {
|
||||
const repo = {
|
||||
name: 'Hello',
|
||||
full_name: 'kremalicious/hello',
|
||||
homepage: 'hello'
|
||||
}
|
||||
|
||||
@ -32,7 +34,7 @@ describe('Repository', () => {
|
||||
})
|
||||
|
||||
it('renders no link without homepage', () => {
|
||||
const repo = { name: 'Hello' }
|
||||
const repo = { name: 'Hello', full_name: 'repo/hello' }
|
||||
|
||||
const { container } = render(<Repository repo={repo} />)
|
||||
expect(container.querySelectorAll('p:last-child a').length).toBe(2)
|
||||
|
@ -19,7 +19,8 @@ describe('Home', () => {
|
||||
const pageContext = {
|
||||
repos: [
|
||||
{
|
||||
name: 'Hello'
|
||||
name: 'hello',
|
||||
full_name: 'kremalicious/hello'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user