From 5078c583035f334a8d0fd448373d60716b18d2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Wed, 6 Mar 2024 02:56:00 +0900 Subject: [PATCH] fix test --- packages/backend/test/e2e/drive.ts | 2 +- packages/backend/test/e2e/users.ts | 2 +- packages/backend/test/unit/FetchInstanceMetadataService.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/test/e2e/drive.ts b/packages/backend/test/e2e/drive.ts index 94616d549f..35b28152ca 100644 --- a/packages/backend/test/e2e/drive.ts +++ b/packages/backend/test/e2e/drive.ts @@ -6,7 +6,7 @@ process.env.NODE_ENV = 'test'; import * as assert from 'assert'; -import { api, makeStreamCatcher, post, signup, uploadFile } from '../utils.js'; +import { api, makeStreamCatcher, post, sendEnvUpdateRequest, signup, uploadFile } from '../utils.js'; import type * as misskey from 'misskey-js'; describe('Drive', () => { diff --git a/packages/backend/test/e2e/users.ts b/packages/backend/test/e2e/users.ts index c2f7eca12f..c31b963a95 100644 --- a/packages/backend/test/e2e/users.ts +++ b/packages/backend/test/e2e/users.ts @@ -779,7 +779,7 @@ describe('ユーザー', () => { }); test.each([ { label: '「見つけやすくする」がOFFのユーザーが含まれる', user: () => userNotExplorable }, - { label: 'ミュートユーザーが含まれる', user: () => userMutedByAlice }, + { label: 'ミュートユーザーが含まれない', user: () => userMutedByAlice, excluded: true }, { label: 'ブロックされているユーザーが含まれる', user: () => userBlockedByAlice }, { label: 'ブロックしてきているユーザーが含まれない', user: () => userBlockingAlice, excluded: true }, { label: '承認制ユーザーが含まれる', user: () => userLocking }, diff --git a/packages/backend/test/unit/FetchInstanceMetadataService.ts b/packages/backend/test/unit/FetchInstanceMetadataService.ts index 7994605555..029a333be5 100644 --- a/packages/backend/test/unit/FetchInstanceMetadataService.ts +++ b/packages/backend/test/unit/FetchInstanceMetadataService.ts @@ -129,7 +129,7 @@ describe('FetchInstanceMetadataService', () => { const unlockSpy = jest.spyOn(fetchInstanceMetadataService, 'unlock'); await fetchInstanceMetadataService.fetchInstanceMetadata({ host: 'example.com' } as any, true); - expect(tryLockSpy).toHaveBeenCalledTimes(0); + expect(tryLockSpy).toHaveBeenCalledTimes(1); expect(unlockSpy).toHaveBeenCalledTimes(1); expect(federatedInstanceService.fetch).toHaveBeenCalledTimes(0); expect(httpRequestService.getJson).toHaveBeenCalled();