Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrpospiech committed Feb 15, 2024
1 parent 6839ddd commit 0e82768
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/uniforms/__suites__/BaseForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function testBaseForm(BaseForm: typeof UniformsBaseForm) {

test('<BaseForm> - when rendered, have correct children', () => {
const { container } = render(
<BaseForm disabled schema={schema}>
<BaseForm schema={schema}>
<div />
<div />
<div />
Expand All @@ -36,14 +36,7 @@ export function testBaseForm(BaseForm: typeof UniformsBaseForm) {
});

test('<BaseForm> - when submitted, calls `onSubmit` once', () => {
render(
<BaseForm
model={model}
schema={schema}
onSubmit={onSubmit}
data-testid="form"
/>,
);
render(<BaseForm schema={schema} onSubmit={onSubmit} data-testid="form" />);

fireEvent.submit(screen.getByTestId('form'));
expect(onSubmit).toHaveBeenCalledTimes(1);
Expand Down

0 comments on commit 0e82768

Please sign in to comment.