Download react-hook-form/src/__tests__/logic/shouldSubscribeByName.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 866 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/src/__tests__/logic/shouldSubscribeByName.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-hook-form/src/__tests__/logic/shouldSubscribeByName.test.ts
-
curl -L -o shouldSubscribeByName.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/src/__tests__/logic/shouldSubscribeByName.test.ts
866 Bytes
| import shouldSubscribeByName from '../../logic/shouldSubscribeByName'; | |
| describe('shouldSubscribeByName', () => { | |
| it('should return correct response for subscription name coverage', () => { | |
| expect(shouldSubscribeByName(undefined, 'test')).toBeTruthy(); | |
| expect(shouldSubscribeByName('test', undefined)).toBeTruthy(); | |
| expect(shouldSubscribeByName(['test'], undefined)).toBeTruthy(); | |
| expect(shouldSubscribeByName(['test'], 'test')).toBeTruthy(); | |
| expect(shouldSubscribeByName(['tes'], 'test')).toBeTruthy(); | |
| expect(shouldSubscribeByName(['test1'], 'test')).toBeTruthy(); | |
| expect(shouldSubscribeByName('test1', 'test')).toBeTruthy(); | |
| expect(shouldSubscribeByName('tes', 'test')).toBeTruthy(); | |
| expect(shouldSubscribeByName('testXXX', 'data')).toBeFalsy(); | |
| expect(shouldSubscribeByName(['testXXX'], 'data')).toBeFalsy(); | |
| }); | |
| }); | |