-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(<ScoringType goalType="ev" />).container; | ||
}); | ||
|
||
it("should render empty", () => { | ||
expect(container).toBeEmptyDOMElement(); | ||
}); | ||
}); | ||
|
||
describe("when rendered with a short handed goal", () => { | ||
beforeEach(() => { | ||
render(<ScoringType goalType="sh" />); | ||
}); | ||
|
||
it("should render `SHG`", () => { | ||
expect(screen.getByText("SHG")).toBeInTheDocument(); | ||
}); | ||
}); | ||
|
||
describe("when rendered with a power play goal", () => { | ||
beforeEach(() => { | ||
render(<ScoringType goalType="pp" />); | ||
}); | ||
|
||
it("should render `PP`", () => { | ||
expect(screen.getByText("PP")).toBeInTheDocument(); | ||
}); | ||
}); | ||
|
||
describe("when rendered with a empty net goal", () => { | ||
beforeEach(() => { | ||
render(<ScoringType goalType="en" />); | ||
}); | ||
|
||
it("should render `EN`", () => { | ||
expect(screen.getByText("EN")).toBeInTheDocument(); | ||
}); | ||
}); | ||
}); |
85c28b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nhl-remix – ./
nhl-remix-smoak.vercel.app
nhl-remix.vercel.app
nhl-remix-git-main-smoak.vercel.app