This commit is contained in:
Carl Downing
2023-07-30 14:59:11 -07:00
parent c213447ba3
commit ad685d2e1a
3 changed files with 5 additions and 5 deletions

View File

@@ -372,7 +372,7 @@ const BasicForm: ForwardRefExoticComponent<any> = forwardRef(
);
}
// if the field is still null but has a default value then... have the default inital value
// if the field is still null but has a default value then... have the default initial value
if (
field.defaultValue &&
(values as any)[fieldName] === undefined

View File

@@ -117,7 +117,7 @@ describe('Input', () => {
expect(screen.getByDisplayValue(value)).toBeInTheDocument();
});
test('value overrides initalValue', () => {
test('value overrides initialValue', () => {
const value: string = 'value';
const initialValue: string = 'initial value';
@@ -136,7 +136,7 @@ describe('Input', () => {
expect(screen.getByDisplayValue(newValue)).toBeInTheDocument();
});
test('resets input to initalValue when value changes to empty string', () => {
test('resets input to initialValue when value changes to empty string', () => {
const value: string = 'value';
const initialValue: string = 'initial value';

View File

@@ -4,7 +4,7 @@ import TextArea from '../../Components/TextArea/TextArea';
import '@testing-library/jest-dom/extend-expect';
describe('TextArea', () => {
test('renders textarea element with initalValue only', () => {
test('renders textarea element with initialValue only', () => {
const { getByRole } = render(<TextArea initialValue="initial value" />);
const textarea: HTMLElement = getByRole('textbox');
@@ -67,7 +67,7 @@ describe('TextArea', () => {
expect(onBlur).toHaveBeenCalledTimes(1);
});
test('sets initalValue', () => {
test('sets initialValue', () => {
const { getByDisplayValue } = render(
<TextArea initialValue="initial value" />
);