型アサーションの追加

This commit is contained in:
Kisaragi Marine 2024-07-09 19:27:21 +09:00
parent 54ee8834d1
commit 0be833b4f5
No known key found for this signature in database
GPG Key ID: C6631564CD2110E4
1 changed files with 2 additions and 2 deletions

View File

@ -63,8 +63,8 @@ export const failedApiCall = async <E extends keyof misskey.Endpoints, P extends
const res = await api(endpoint, parameters, user);
assert.strictEqual(res.status, status, inspect(res.body));
assert.ok(res.body);
assert.strictEqual(res.body.error.code, code, inspect(res.body));
assert.strictEqual(res.body.error.id, id, inspect(res.body));
assert.strictEqual(castAsError(res.body as any).error.code, code, inspect(res.body));
assert.strictEqual(castAsError(res.body as any).error.id, id, inspect(res.body));
return res.body;
};