Download react-hook-form/cypress/e2e/watchDefaultValues.cy.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 716 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/cypress/e2e/watchDefaultValues.cy.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-hook-form/cypress/e2e/watchDefaultValues.cy.ts
-
curl -L -o watchDefaultValues.cy.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/cypress/e2e/watchDefaultValues.cy.ts
716 Bytes
| describe('watchDefaultValues', () => { | |
| it('should return default value with watch', () => { | |
| cy.visit('http://localhost:3000/watch-default-values'); | |
| cy.get('#watchAll').should( | |
| 'have.text', | |
| '{"test":"test","test1":{"firstName":"firstName","lastName":["lastName0","lastName1"],"deep":{"nest":"nest"}},"flatName[1]":{"whatever":"flat"}}', | |
| ); | |
| cy.get('#array').should('have.text', '["test",{"whatever":"flat"}]'); | |
| cy.get('#getArray').should('have.text', '["lastName0","lastName1"]'); | |
| cy.get('#object').should('have.text', '["test","firstName"]'); | |
| cy.get('#single').should('have.text', '"firstName"'); | |
| cy.get('#singleDeepArray').should('have.text', '"lastName0"'); | |
| }); | |
| }); | |