-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update: remove test files from prod bundle
- Loading branch information
1 parent
ae3b4b3
commit 24f907b
Showing
9 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const defaultTestFormName = "test"; |
24 changes: 24 additions & 0 deletions
24
packages/react-formz-web/testUtils/createDefaultFormzState.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { FormzState, FormzValues } from "@zerry/react-formz-core"; | ||
|
||
function createDefaultFormzState<Values extends FormzValues>(partial?: Partial<FormzState<Values>> ): FormzState<Values> { | ||
const state: FormzState<Values> = { | ||
values: {} as Values, | ||
errors: {}, | ||
isInvalid: false, | ||
isSubmitting: false, | ||
isValidating: false, | ||
initialValues: {} as Values, | ||
initialized: true, | ||
touched: {}, | ||
submitCount: 0, | ||
saveDrafts: false, | ||
lastPersistedAt: null, | ||
hydrated: false, | ||
restoredFromDate: null, | ||
...partial, | ||
}; | ||
|
||
return state; | ||
} | ||
|
||
export default createDefaultFormzState; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.