完成80%

This commit is contained in:
2026-07-27 06:50:07 +08:00
parent 8475bbd19a
commit 1eae3bbef4
63 changed files with 13664 additions and 280 deletions
+48
View File
@@ -197,6 +197,54 @@ const run = async () => {
(error) => error?.code === "GENEALOGY_RESPONSE_INVALID",
);
nextResponse = {
statusCode: 200,
data: { code: 200, data: 7 },
};
assert.strictEqual(await appApi.getUnreadNotificationCount(), 7);
assert.strictEqual(
requests.at(-1).url,
"https://backend-api.ddxcjp.cn/genealogy/app/notifications/unread-count",
);
nextResponse = {
statusCode: 200,
data: { code: 200, data: -1 },
};
await assert.rejects(
appApi.getUnreadNotificationCount(),
(error) => error?.code === "NOTIFICATION_COUNT_RESPONSE_INVALID",
);
const quota = {
createUsed: 1,
createLimit: 3,
createRemaining: 2,
canCreate: true,
joinUsed: 2,
joinLimit: 10,
joinRemaining: 8,
canJoin: true,
};
nextResponse = {
statusCode: 200,
data: { code: 200, data: quota },
};
assert.deepStrictEqual(await appApi.getGenealogyQuota(), quota);
assert.strictEqual(
requests.at(-1).url,
"https://backend-api.ddxcjp.cn/genealogy/app/genealogies/quota",
);
nextResponse = {
statusCode: 200,
data: { code: 200, data: { ...quota, canJoin: undefined } },
};
await assert.rejects(
appApi.getGenealogyQuota(),
(error) => error?.code === "GENEALOGY_QUOTA_RESPONSE_INVALID",
);
process.stdout.write("G01-MY-GENEALOGIES-RUNTIME-SMOKE PASS\n");
};