Skip to content

Commit b43e92a

Browse files
author
Erik Rasmussen
committed
Fix lint: Convert test to .js format to match project conventions
1 parent ecc0c30 commit b43e92a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
/**
22
* @jest-environment jsdom
33
*/
4-
import * as React from 'react'
5-
import { render, fireEvent, waitFor } from '@testing-library/react'
4+
import React from 'react'
5+
import { render, cleanup, act } from '@testing-library/react'
66
import '@testing-library/jest-dom'
77
import Form from './ReactFinalForm'
88
import Field from './Field'
9-
import { act } from 'react-dom/test-utils'
109

1110
describe('useField - Dynamic Name (Issue #869)', () => {
12-
it('should keep name and value in sync when field name changes', async () => {
11+
afterEach(cleanup)
12+
13+
it('should keep name and value in sync when field name changes', () => {
1314
const renderSpy = jest.fn()
1415

15-
const TestComponent = ({ fieldName }: { fieldName: string }) => {
16+
const TestComponent = ({ fieldName }) => {
1617
return (
1718
<Form
1819
onSubmit={() => {}}
@@ -59,8 +60,8 @@ describe('useField - Dynamic Name (Issue #869)', () => {
5960
})
6061
})
6162

62-
it('should have correct value immediately after name change (no stale renders)', async () => {
63-
const TestComponent = ({ fieldName }: { fieldName: string }) => {
63+
it('should have correct value immediately after name change (no stale renders)', () => {
64+
const TestComponent = ({ fieldName }) => {
6465
return (
6566
<Form
6667
onSubmit={() => {}}

0 commit comments

Comments
 (0)