mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-10 06:20:25 +00:00
fix: bug where wakatime api returns undefined languages (#1403)
Co-authored-by: Markus Tyrkkö <markus.tyrkko@nitor.com>
This commit is contained in:
co-authored by
Markus Tyrkkö
parent
bc6c22ea17
commit
28fa0b8877
@@ -46,4 +46,12 @@ describe("Test Render Wakatime Card", () => {
|
||||
document.body.innerHTML = renderWakatimeCard(wakaTimeData.data, {});
|
||||
expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5");
|
||||
});
|
||||
|
||||
it('should show "no coding activitiy this week" message when there hasn not been activity', () => {
|
||||
document.body.innerHTML = renderWakatimeCard({
|
||||
...wakaTimeData.data,
|
||||
languages: undefined
|
||||
}, {});
|
||||
expect(document.querySelector(".stat").textContent).toBe("No coding activity this week")
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user