mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-05-24 17:34:57 +00:00
tests: add missing card set title test (#3190)
This commit is contained in:
committed by
GitHub
parent
13af3ba4df
commit
7a6ed4d8a8
@@ -41,6 +41,16 @@ describe("Card", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("should set custom title", () => {
|
||||
const card = new Card({});
|
||||
card.setTitle("custom title");
|
||||
|
||||
document.body.innerHTML = card.render(``);
|
||||
expect(queryByTestId(document.body, "card-title")).toHaveTextContent(
|
||||
"custom title",
|
||||
);
|
||||
});
|
||||
|
||||
it("should hide title", () => {
|
||||
const card = new Card({});
|
||||
card.setHideTitle(true);
|
||||
|
||||
Reference in New Issue
Block a user