mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-07-28 14:59:53 +00:00
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:
@ -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", () => {
|
||||
|
Reference in New Issue
Block a user