mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-03 00:17:58 +00:00
feat: custom card title (#293)
* Custom stats title (anuraghazra#229) * Add custom title test * remove unused code * Update readme.md to include the `custom_title` option * Update readme_es.md to include `custom_title` option Co-Authored-By: José Javier Rodríguez Zas <jjavierdguezas@gmail.com> * Merge branch 'master' of https://github.com/anuraghazra/github-readme-stats.git into custom-title * feat: added customTitle option in Card Co-authored-by: José Javier Rodríguez Zas <jjavierdguezas@gmail.com> Co-authored-by: Anurag <hazru.anurag@gmail.com>
This commit is contained in:
co-authored by
José Javier Rodríguez Zas
Anurag
parent
e1932fdf74
commit
057ff69ac2
@@ -28,6 +28,18 @@ describe("Card", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("should have a custom title", () => {
|
||||
const card = new Card({
|
||||
customTitle: "custom title",
|
||||
defaultTitle: "default 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