From a79b2f0dc87b0c3099c598dd0694754d79f05d24 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 30 Aug 2025 19:54:51 +0900 Subject: [PATCH] fix test --- .../test-federation/test/api/ap/show.test.ts | 13 +++++++++---- packages/backend/test-federation/test/user.test.ts | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/backend/test-federation/test/api/ap/show.test.ts b/packages/backend/test-federation/test/api/ap/show.test.ts index d502465303..8c3295fd06 100644 --- a/packages/backend/test-federation/test/api/ap/show.test.ts +++ b/packages/backend/test-federation/test/api/ap/show.test.ts @@ -36,10 +36,15 @@ describe('API ap/show', () => { strictEqual(res.object.id, alice.id); }); - test('resolve a remote user by local profile URL (https://a.test/@bob@b.test)', async () => { - const res = await alice.client.request('ap/show', { uri: `https://a.test/@${bob.username}@b.test` }); - strictEqual(res.type, 'User'); - strictEqual(res.object.uri, `https://b.test/users/${bob.id}`); + test('throws in resolving a remote user by local profile URL (https://a.test/@bob@b.test)', async () => { + await rejects( + async () => await alice.client.request('ap/show', { uri: `https://a.test/@${bob.username}@b.test` }), + (err: any) => { + strictEqual(err.code, 'NO_SUCH_OBJECT'); + strictEqual(err.info.e.message, 'No such object.'); + return true; + }, + ); }); }); diff --git a/packages/backend/test-federation/test/user.test.ts b/packages/backend/test-federation/test/user.test.ts index 3b9722975d..ebbe9ff5ba 100644 --- a/packages/backend/test-federation/test/user.test.ts +++ b/packages/backend/test-federation/test/user.test.ts @@ -516,7 +516,7 @@ describe('User', () => { await rejects( async () => await resolveRemoteUser('a.test', alice.id, bob), (err: any) => { - strictEqual(err.code, 'SOMETHING_HAPPENED_IN_FETCHING_URI'); + strictEqual(err.code, 'INTERNAL_ERROR'); return true; }, ); @@ -551,7 +551,7 @@ describe('User', () => { await rejects( async () => await resolveRemoteUser('a.test', alice.id, bob), (err: any) => { - strictEqual(err.code, 'SOMETHING_HAPPENED_IN_FETCHING_URI'); + strictEqual(err.code, 'INTERNAL_ERROR'); return true; }, );