mirror of
https://github.com/System-End/github-readme-stats.git
synced 2026-04-19 16:38:23 +00:00
Tests: Add index endpoint blacklist test (#3130)
This commit is contained in:
parent
4cf33ad1bf
commit
988044a199
1 changed files with 9 additions and 0 deletions
|
|
@ -276,4 +276,13 @@ describe("Test /api/", () => {
|
|||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("should render error card if username in blacklist", async () => {
|
||||
const { req, res } = faker({ username: "renovate-bot" }, data_stats);
|
||||
|
||||
await api(req, res);
|
||||
|
||||
expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml");
|
||||
expect(res.send).toBeCalledWith(renderError("Something went wrong"));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue