mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-10 08:53:02 +01:00
型アサーションの追加
This commit is contained in:
parent
54ee8834d1
commit
0be833b4f5
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue