import { cleanup, render } from '@testing-library/react' import React, { useEffect } from 'react' import { beforeEach, describe, expect, test } from 'vitest' import { useForm } from '../lib' import { Insight, Util } from './shared' beforeEach(cleanup) describe('Utility', () => { test('Manually set a single field', async () => { const value = 'foo' function Component() { const { field, setField, form } = useForm({ username: '', password: '' }) useEffect(() => setField('username', value), []) return (