Add prettier check to CI (#1999)

* Add prettier check to CI

* Run prettier:format
This commit is contained in:
Steven authored and GitHub committed 2022-09-06 09:09:45 +02:00
1 parent d5c94b6f57
commit 4c2307ab4b
10 files changed
+56 -38

No files matched your search

+4 -1
View File
@@ -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",
+1 -1
View File
@@ -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',
);
});
});
+11 -6
View File
@@ -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",
);
});
});