Download react-hook-form/src/__tests__/logic/getFieldValueAs.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 379 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/src/__tests__/logic/getFieldValueAs.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-hook-form/src/__tests__/logic/getFieldValueAs.test.ts
-
curl -L -o getFieldValueAs.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/src/__tests__/logic/getFieldValueAs.test.ts
379 Bytes
| import getFieldValueAs from '../../logic/getFieldValueAs'; | |
| describe('getFieldValueAs', () => { | |
| it('should return undefined when value is undefined', () => { | |
| expect( | |
| getFieldValueAs(undefined, { | |
| ref: { | |
| name: 'test', | |
| }, | |
| name: 'test', | |
| valueAsNumber: true, | |
| valueAsDate: false, | |
| }), | |
| ).toBeUndefined(); | |
| }); | |
| }); | |