fix: failing verify FCM token test
due to incorrect fake admin SDK JSON
This commit is contained in:
@@ -2,21 +2,22 @@ import { describe, expect, it } from "bun:test";
|
|||||||
|
|
||||||
import { server } from "~/mocks";
|
import { server } from "~/mocks";
|
||||||
|
|
||||||
|
import type { AdminSdkCredentials } from "./getGoogleAuthToken";
|
||||||
import { verifyFcmToken } from "./verifyFcmToken";
|
import { verifyFcmToken } from "./verifyFcmToken";
|
||||||
|
|
||||||
server.listen();
|
server.listen();
|
||||||
|
|
||||||
const FAKE_ADMIN_SDK_JSON = {
|
const FAKE_ADMIN_SDK_JSON: AdminSdkCredentials = {
|
||||||
type: "service_account",
|
type: "service_account",
|
||||||
projectID: "test-26g38",
|
projectId: "test-26g38",
|
||||||
privateKeyID: "privateKeyId",
|
privateKeyId: "privateKeyId",
|
||||||
privateKey: "privateKey",
|
privateKey: "privateKey",
|
||||||
clientEmail: "test@test.com",
|
clientEmail: "test@test.com",
|
||||||
clientID: "clientId",
|
clientID: "clientId",
|
||||||
authURI: "https://accounts.google.com/o/oauth2/auth",
|
authURI: "https://accounts.google.com/o/oauth2/auth",
|
||||||
tokenURI: "https://oauth2.googleapis.com/token",
|
tokenURI: "https://oauth2.googleapis.com/token",
|
||||||
authProviderX509CERTURL: "https://www.googleapis.com/oauth2/v1/certs",
|
authProviderX509CertUrl: "https://www.googleapis.com/oauth2/v1/certs",
|
||||||
clientX509CERTURL:
|
clientX509CertUrl:
|
||||||
"https://www.googleapis.com/robot/v1/metadata/x509/test%40test.com",
|
"https://www.googleapis.com/robot/v1/metadata/x509/test%40test.com",
|
||||||
universeDomain: "aniplay.com",
|
universeDomain: "aniplay.com",
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user