Skip to content

Commit

Permalink
add tests for Input and InputMasked
Browse files Browse the repository at this point in the history
  • Loading branch information
joakbjerk committed Nov 30, 2023
1 parent 24fee58 commit 597326c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ describe('InputMasked component', () => {
})

it('gets valid element when ref is function', () => {
const ref = React.createRef<HTMLInputElement | null>()
const ref: React.MutableRefObject<HTMLInputElement> = React.createRef()

const refFn = (elem: HTMLInputElement) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
ref.current = elem
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,9 @@ describe('Input component', () => {
})

it('gets valid element when ref is function', () => {
const ref = React.createRef<HTMLInputElement | null>()
const ref: React.MutableRefObject<HTMLInputElement> = React.createRef()

const refFn = (elem: HTMLInputElement) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
ref.current = elem
}

Expand Down

0 comments on commit 597326c

Please sign in to comment.