mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-02 20:24:52 +00:00
feat(gist): handle missing param error (#3101)
This commit is contained in:
@@ -69,4 +69,10 @@ describe("Test fetchGist", () => {
|
||||
"Some test GraphQL error",
|
||||
);
|
||||
});
|
||||
|
||||
it("should throw error if id is not provided", async () => {
|
||||
await expect(fetchGist()).rejects.toThrow(
|
||||
'Missing params "id" make sure you pass the parameters in URL',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -70,6 +70,7 @@ describe("Test /api/gist", () => {
|
||||
it("should get the query options", async () => {
|
||||
const req = {
|
||||
query: {
|
||||
id: "bbfce31e0217a3689c8d961a356cb10d",
|
||||
title_color: "fff",
|
||||
icon_color: "fff",
|
||||
text_color: "fff",
|
||||
|
||||
Reference in New Issue
Block a user