summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/ServerService.ts
diff options
context:
space:
mode:
authorおさむのひと <46447427+samunohito@users.noreply.github.com>2025-05-04 09:38:35 +0900
committerGitHub <noreply@github.com>2025-05-04 09:38:35 +0900
commit8c0c503c6c85c893dceea29c975f3b6b14fc1b52 (patch)
treec128a575c3ec0bfd3516174d9f6081c28d6ac90b /packages/backend/src/server/ServerService.ts
parentperf(frontend): improve MkInstanceTicker rendering performance (diff)
downloadmisskey-8c0c503c6c85c893dceea29c975f3b6b14fc1b52.tar.gz
misskey-8c0c503c6c85c893dceea29c975f3b6b14fc1b52.tar.bz2
misskey-8c0c503c6c85c893dceea29c975f3b6b14fc1b52.zip
refactor: ファイルアップロード時のテストを追加 (#15928)
* refactor: ファイルアップロード時のテストを追加 * なぜかsemverが消えてた
Diffstat (limited to 'packages/backend/src/server/ServerService.ts')
-rw-r--r--packages/backend/src/server/ServerService.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/backend/src/server/ServerService.ts b/packages/backend/src/server/ServerService.ts
index 355d7ca08e..c859f1d82c 100644
--- a/packages/backend/src/server/ServerService.ts
+++ b/packages/backend/src/server/ServerService.ts
@@ -7,7 +7,7 @@ import cluster from 'node:cluster';
import * as fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
-import Fastify, { FastifyInstance } from 'fastify';
+import Fastify, { type FastifyInstance } from 'fastify';
import fastifyStatic from '@fastify/static';
import fastifyRawBody from 'fastify-raw-body';
import { IsNull } from 'typeorm';
@@ -309,6 +309,13 @@ export class ServerService implements OnApplicationShutdown {
await this.#fastify.close();
}
+ /**
+ * Get the Fastify instance for testing.
+ */
+ public get fastify(): FastifyInstance {
+ return this.#fastify;
+ }
+
@bindThis
async onApplicationShutdown(signal: string): Promise<void> {
await this.dispose();