import React from 'react' import * as Sentry from '@sentry/react' export const testErrors = () => { const notFound = async () => { const req = await fetch('http://localhost:3000/api/users/notFound', { method: 'GET', }) } const cannotCreate = async () => { const req = await fetch('http://localhost:3000/api/posts', { method: 'POST', body: JSON.stringify({ text: 'New post', }), }) } const badLogin = async () => { const req = await fetch('http://localhost:3000/api/users/login', { method: 'POST', body: JSON.stringify({ email: 'sorry@whoareyou.com', password: '123456', }), }) } const badReq = async () => { const req = await fetch('http://localhost:3000/api/users/forgot-password', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json', }, }) } const badReset = async () => { const req = await fetch('http://localhost:3000/api/users/reset-password', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ token: '7eac3830ffcfc7f9f66c00315dabeb11575dba91', password: 'newPassword', }), }) } const badVerify = async () => { const req = await fetch('http://localhost:3000/api/users/unlock', { method: 'POST', headers: { 'Content-Type': 'application/json', }, }) } return (

Test Errors

) }