Fix all type errors
This commit is contained in:
parent
c4ba5e7fd5
commit
7e3f6f0306
45 changed files with 377 additions and 294 deletions
|
@ -41,6 +41,7 @@ describe('extractHtmlMeta', () => {
|
|||
|
||||
it.each(cases)(
|
||||
'given the html tag %p, returns %p',
|
||||
// @ts-ignore not worth fixing -prf
|
||||
(input, expectedResult) => {
|
||||
const output = extractHtmlMeta({html: input as string, hostname: ''})
|
||||
expect(output).toEqual(expectedResult)
|
||||
|
@ -86,6 +87,7 @@ describe('extractHtmlMeta', () => {
|
|||
title: '@bluesky on Twitter',
|
||||
}
|
||||
const output = extractHtmlMeta({
|
||||
html: '',
|
||||
hostname: 'twitter.com',
|
||||
pathname: '/bluesky',
|
||||
})
|
||||
|
@ -97,6 +99,7 @@ describe('extractHtmlMeta', () => {
|
|||
title: 'Tweet by @bluesky',
|
||||
}
|
||||
const output = extractHtmlMeta({
|
||||
html: '',
|
||||
hostname: 'twitter.com',
|
||||
pathname: '/bluesky/status/1582437529969917953',
|
||||
})
|
||||
|
@ -108,6 +111,7 @@ describe('extractHtmlMeta', () => {
|
|||
title: 'Twitter',
|
||||
}
|
||||
const output = extractHtmlMeta({
|
||||
html: '',
|
||||
hostname: 'twitter.com',
|
||||
pathname: '/i/articles/follows/-1675653703?time_window=24',
|
||||
})
|
||||
|
|
|
@ -5,7 +5,7 @@ import {mockedRootStore, mockedShellStore} from '../../../__mocks__/state-mock'
|
|||
|
||||
describe('useOnMainScroll', () => {
|
||||
const mockedProps = {
|
||||
navIdx: [0, 0] as [number, number],
|
||||
navIdx: '0-0',
|
||||
params: {},
|
||||
visible: true,
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import {cleanup, fireEvent, render} from '../../../jest/test-utils'
|
|||
describe('Search', () => {
|
||||
jest.useFakeTimers()
|
||||
const mockedProps = {
|
||||
navIdx: [0, 0] as [number, number],
|
||||
navIdx: '0-0',
|
||||
params: {
|
||||
name: 'test name',
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue