test: add test for invalid ADMIN_SDK_JSON

This commit is contained in:
2024-06-15 06:11:42 -04:00
parent a9e363e814
commit 5dc45fac58

View File

@@ -37,4 +37,15 @@ describe("verifyFcmToken", () => {
expect(res).toBeFalse(); expect(res).toBeFalse();
}); });
it("invalid ADMIN_SDK_JSON, returns false", async () => {
const token =
"7v8sy43aq0re4r8xe7rmr0cn1fsmh6phehnfla2pa73z899zmhyarivmkt4sj6pyv0py43u6p2sim6wz2vg9ypjp9rug1keoth7f6ll3gdvas4q020u3ah51r6bjgn51j6bd92ztmtof3ljpcm8q31njvndy65enm68";
const res = await verifyFcmToken(token, {
...FAKE_ADMIN_SDK_JSON,
clientEmail: "",
});
expect(res).toBeFalse();
});
}); });