This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from "react"; | |
import { useForm, SubmitHandler } from "react-hook-form"; | |
import "isomorphic-unfetch"; | |
interface InputValues { | |
name: string; | |
email: string; | |
message: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from "react"; | |
import { useForm, SubmitHandler } from "react-hook-form"; | |
import "isomorphic-unfetch"; | |
type InputValues = { | |
name: string; | |
email: string; | |
message: string; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render, fireEvent, screen } from "@testing-library/react"; | |
import ContactForm from "../ContactForm"; | |
describe("<ContactForm />", () => { | |
beforeEach(() => { | |
render(<ContactForm />); | |
}); | |
test("should display required errors when fields are invalid", async () => { | |
fireEvent.submit(screen.getByRole("button"), { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render, fireEvent, screen } from "@testing-library/react"; | |
import ContactForm from "../ContactForm"; | |
describe("<ContactForm />", () => { | |
beforeEach(() => { | |
render(<ContactForm />); | |
}); | |
test("should display required errors when fields are invalid", async () => { | |
fireEvent.submit(screen.getByRole("button"), { |