fix: stats hide_border bug (#151)

* fix: stats hide border bug

* fix white border on dark mode issue

* chore: refactor code & tests

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
This commit is contained in:
Liam
2020-07-24 03:37:09 -04:00
committed by GitHub
parent 7a8510641c
commit 9624cf6acd
2 changed files with 11 additions and 4 deletions

View File

@ -71,8 +71,16 @@ describe("Test renderStatsCard", () => {
it("should hide_border", () => {
document.body.innerHTML = renderStatsCard(stats, { hide_border: true });
expect(queryByTestId(document.body, "card-bg")).toHaveAttribute(
"stroke-opacity",
"0"
);
expect(queryByTestId(document.body, "card-bg")).not.toBeInTheDocument();
document.body.innerHTML = renderStatsCard(stats, { hide_border: false });
expect(queryByTestId(document.body, "card-bg")).toHaveAttribute(
"stroke-opacity",
"1"
);
});
it("should hide_rank", () => {