diff --git a/app/components/ScoringDetail/ScoringType/test.tsx b/app/components/ScoringDetail/ScoringType/test.tsx new file mode 100644 index 0000000..eef3a10 --- /dev/null +++ b/app/components/ScoringDetail/ScoringType/test.tsx @@ -0,0 +1,46 @@ +import { render, screen } from "@testing-library/react"; +import { ScoringType } from "."; + +describe("ScoringType", () => { + describe("when rendered with an even strength goal", () => { + let container: HTMLElement; + + beforeEach(() => { + container = render().container; + }); + + it("should render empty", () => { + expect(container).toBeEmptyDOMElement(); + }); + }); + + describe("when rendered with a short handed goal", () => { + beforeEach(() => { + render(); + }); + + it("should render `SHG`", () => { + expect(screen.getByText("SHG")).toBeInTheDocument(); + }); + }); + + describe("when rendered with a power play goal", () => { + beforeEach(() => { + render(); + }); + + it("should render `PP`", () => { + expect(screen.getByText("PP")).toBeInTheDocument(); + }); + }); + + describe("when rendered with a empty net goal", () => { + beforeEach(() => { + render(); + }); + + it("should render `EN`", () => { + expect(screen.getByText("EN")).toBeInTheDocument(); + }); + }); +});