1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-22 17:23:50 +01:00

typing fixes

This commit is contained in:
Matthias Kretschmann 2021-06-11 22:08:11 +02:00
parent 9d801636bb
commit ffc0e1b1b3
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,11 @@
import React, { ReactElement } from 'react'
import { input } from './Input.module.css'
export default function Input({ className, ...props }: any): ReactElement {
export default function Input({
className,
...props
}: {
className: string
}): ReactElement {
return <input className={`${input} ${className || ''}`} {...props} />
}

View File

@ -5,7 +5,7 @@ import Conversion from './Conversion'
describe('Conversion', () => {
it('renders without crashing', async () => {
const { findByText } = render(<Conversion amount={1} />)
render(<Conversion amount="1" />)
// const lazyElement = await findByText(/= €/)
// expect(lazyElement).toBeInTheDocument()
})

View File

@ -13,7 +13,7 @@ describe('InputGroup', () => {
expect(container.firstChild).toBeInTheDocument()
const input = container.querySelector('input')
const button = container.querySelector('button')
// const button = container.querySelector('button')
fireEvent.change(input, { target: { value: '3' } })
// fireEvent.click(button)
// expect(sendTransaction).toHaveBeenCalled()