Documentación oficial sobre Jest
- Instalaciones de desarrollo (super test es útil para probar Express)
npm install -D jest @types/jest ts-jest supertest
| const isValidEmail = ( email: string ) => { | |
| const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
| return re.test(email); | |
| } |
| if (!values.email) { | |
| errors.email = 'Required'; | |
| } else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(values.email)) { | |
| errors.email = 'Invalid email address'; | |
| } |
| .gpt3__whatgpt3 { | |
| display: flex; | |
| flex-direction: column; | |
| padding: 2rem; | |
| background: var(--color-footer); | |
| /* ff 3.6+ */ | |
| background:-moz-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%); |
Documentación oficial sobre Jest
npm install -D jest @types/jest ts-jest supertest