diff --git a/packages/backend/test/e2e/endpoints.ts b/packages/backend/test/e2e/endpoints.ts index 2b2699ecd9..791a33e985 100644 --- a/packages/backend/test/e2e/endpoints.ts +++ b/packages/backend/test/e2e/endpoints.ts @@ -10,7 +10,7 @@ import * as assert from 'assert'; // https://github.com/node-fetch/node-fetch/pull/1664 import { Blob } from 'node-fetch'; import { MiUser } from '@/models/_.js'; -import { api, initTestDb, post, signup, simpleGet, uploadFile } from '../utils.js'; +import {api, castAsError, initTestDb, post, signup, simpleGet, uploadFile} from '../utils.js'; import type * as misskey from 'misskey-js'; describe('Endpoints', () => { @@ -285,7 +285,8 @@ describe('Endpoints', () => { }, alice); assert.strictEqual(res.status, 400); - assert.strictEqual(res.body.error.code, 'CANNOT_REACT_TO_RENOTE'); + assert.ok(res.body); + assert.strictEqual(castAsError(res.body).error.code, 'CANNOT_REACT_TO_RENOTE'); }); test('引用にリアクションできる', async () => {