mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-05-29 20:22:59 +00:00
Tests: Add index endpoint blacklist test (#3130)
This commit is contained in:
committed by
GitHub
parent
4cf33ad1bf
commit
988044a199
@@ -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"));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user