Add prettier check to CI (#1999)
* Add prettier check to CI * Run prettier:format
This commit is contained in:
1 parent
d5c94b6f57
commit
4c2307ab4b
10 files changed
+56
-38
No files matched your search
@@ -81,7 +81,10 @@ describe("FetchTopLanguages", () => {
|
||||
it("should fetch correct language data while excluding the 'test-repo-1' repository", async () => {
|
||||
mock.onPost("https://api.github.com/graphql").reply(200, data_langs);
|
||||
|
||||
let repo = await fetchTopLanguages("anuraghazra", exclude_repo=["test-repo-1"]);
|
||||
let repo = await fetchTopLanguages(
|
||||
"anuraghazra",
|
||||
(exclude_repo = ["test-repo-1"]),
|
||||
);
|
||||
expect(repo).toStrictEqual({
|
||||
HTML: {
|
||||
color: "#0f0",
|
||||
|
||||
@@ -207,7 +207,7 @@ describe("Wakatime fetcher", () => {
|
||||
mock.onGet(/\/https:\/\/wakatime\.com\/api/).reply(404, wakaTimeData);
|
||||
|
||||
await expect(fetchWakatimeStats("noone")).rejects.toThrow(
|
||||
"Missing params \"username\" make sure you pass the parameters in URL",
|
||||
'Missing params "username" make sure you pass the parameters in URL',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -48,10 +48,15 @@ describe("Test Render Wakatime Card", () => {
|
||||
});
|
||||
|
||||
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")
|
||||
})
|
||||
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